-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,26 +24,50 @@ | |
.byte 0xE0 | ||
.endm | ||
|
||
.macro PLATFORM_JMP Name | ||
#if defined(__APPLE__) | ||
jmp _\Name | ||
#else | ||
jmp _\Name | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
kangaroo
Author
Owner
|
||
#endif | ||
.endm | ||
|
||
.macro PLATFORM_CALL Name | ||
#if defined(__APPLE__) | ||
call _\Name | ||
#else | ||
call \Name | ||
#endif | ||
.endm | ||
|
||
.macro PATCH_LABEL Name | ||
#if defined(__APPLE__) | ||
.global _\Name | ||
_\Name: | ||
#else | ||
.global \Name | ||
\Name: | ||
#endif | ||
.endm | ||
|
||
.macro LEAF_ENTRY Name, Section | ||
#if defined(__APPLE__) | ||
.global _\Name | ||
.text | ||
_\Name: | ||
#else | ||
.global \Name | ||
.type \Name, %function | ||
#endif | ||
\Name: | ||
#endif | ||
.endm | ||
|
||
.macro LEAF_END_MARKED Name, Section | ||
\Name\()_End: | ||
#if defined(__APPLE__) | ||
_\Name\()_End: | ||
.global _\Name\()_End | ||
#else | ||
\Name\()_End: | ||
.global \Name\()_End | ||
.size \Name, .-\Name | ||
#endif | ||
|
@@ -54,7 +78,11 @@ | |
.endm | ||
|
||
.macro PREPARE_EXTERNAL_VAR Name, HelperReg | ||
#if defined(__APPLE__) | ||
mov \HelperReg, [rip + _\Name@GOTPCREL] | ||
#else | ||
mov \HelperReg, [rip + \Name@GOTPCREL] | ||
#endif | ||
.endm | ||
|
||
.macro push_nonvol_reg Register | ||
|
4 comments
on commit 2644cdd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was wrong with using the CHAIN_SUCCESS_COUNTER?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apples preprocessor was having an issue with the double expansion and tried to actually use CHAIN_SUCCESS_COUNTER as the symbol.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems some versions of clang also does have a problem with it. I've checked in a fix - using #define for the CHAIN_SUCCESS_COUNTER - in dotnet#109
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in d6b48b1
typo?