diff options
author | Jonghyun Park <parjong@gmail.com> | 2016-12-09 10:03:07 +0900 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-12-08 17:03:07 -0800 |
commit | eae81ba831eb020d84194f46a41b3a685820b2d4 (patch) | |
tree | 563ebcf8835c62f9f75912413858a63a5d139033 /src/pal | |
parent | 4902abf71f70678044fbd326f4be32df88ea8bfc (diff) | |
download | coreclr-eae81ba831eb020d84194f46a41b3a685820b2d4.tar.gz coreclr-eae81ba831eb020d84194f46a41b3a685820b2d4.tar.bz2 coreclr-eae81ba831eb020d84194f46a41b3a685820b2d4.zip |
[x86/Linux] Revise asmhelper.S using macro (#8523)
* [x86/Linux] Revise asmhelper.S using macro
This commit revises asmhelper.S using macros that inserts CFI
directives.
Diffstat (limited to 'src/pal')
-rw-r--r-- | src/pal/inc/unixasmmacrosx86.inc | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/pal/inc/unixasmmacrosx86.inc b/src/pal/inc/unixasmmacrosx86.inc index 2cff7d13bf..d7d530434a 100644 --- a/src/pal/inc/unixasmmacrosx86.inc +++ b/src/pal/inc/unixasmmacrosx86.inc @@ -35,3 +35,33 @@ C_FUNC(\Name\()_End): .global C_FUNC(\Name\()_End) LEAF_END \Name, \Section .endm + +.macro PROLOG_BEG + push ebp + .cfi_def_cfa_offset 8 + .cfi_offset ebp, -8 + mov ebp, esp +.endm + +.macro PROLOG_PUSH Reg + push \Reg + .cfi_adjust_cfa_offset 4 + .cfi_rel_offset \Reg, 0 +.endm + +.macro PROLOG_END + .cfi_def_cfa_register ebp + .cfi_def_cfa_offset 8 +.endm + +.macro EPILOG_BEG +.endm + +.macro EPILOG_POP Reg + pop \Reg + .cfi_restore \Reg +.endm + +.macro EPILOG_END + pop ebp +.endm |