-
Notifications
You must be signed in to change notification settings - Fork 26
Changes for ARM. #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes for ARM. #10
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,22 +9,37 @@ | |
|
|
||
| #if TARGET_CPU_X86 == 1 | ||
|
|
||
| static INLINE uint32_t _BitScanReverse(uint32_t* index, uint32_t mask) | ||
| /*static INLINE uint32_t _BitScanReverse(uint32_t* index, uint32_t mask) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this necessary? I thought for x86 platforms, there should be no change. Apparently this is breaking the build on Travis.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the part I am unsure about. I got warnings for this but the compilation finished on my laptop.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think after fixing the above mentioned typo, you should be able to un-comment these lines back to their original version and compile this on ARM. Please let me know how it goes.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @PhilippeMorere Did you have a chance to look at this issue? |
||
| { | ||
| __asm__("bsrl %[mask], %[index]" : [index] "=r" (*index) : [mask] "mr" (mask)); | ||
|
|
||
| return mask ? 1 : 0; | ||
| } | ||
| }*/ | ||
|
|
||
| /*static INLINE uint32_t _byteswap_ulong(uint32_t value) | ||
| { | ||
| int32_t tmp; | ||
|
|
||
| static INLINE uint32_t _byteswap_ulong(uint32_t value) | ||
| __asm __volatile( | ||
| "eor %1, %2, %2, ror #16\n" | ||
| "bic %1, %1, #0x00ff0000\n" | ||
| "mov %0, %2, ror #8\n" | ||
| "eor %0, %0, %1, lsr #8" | ||
| : "=r" (value), "=r" (tmp) | ||
| : "r" (value) | ||
| ); | ||
|
|
||
| return value; | ||
| }*/ | ||
|
|
||
| /*static INLINE uint32_t _byteswap_ulong(uint32_t value) | ||
| { | ||
| __asm("bswap %0": | ||
| "=r" (value): | ||
| "0" (value)); | ||
|
|
||
| return value; | ||
| } | ||
| }*/ | ||
|
|
||
| static inline uint32_t clz(uint32_t code) | ||
| { | ||
|
|
||
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.
Shouldn't this be
TARGET_CPU_X86?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.
You are right, this is a typo...