feat: Add x86 control registers to the inline asm register list - #3486
Conversation
|
Please add a test and update the releasenotes too |
| reg_register_list(target, x86_control_regs, 3, ASM_REG_INT, ARG_BITS_64, X86_CR2); | ||
| } | ||
|
|
||
| reg_register(target, x86_control_regs[3], ASM_REG_INT, ARG_BITS_32, X86_CR0); |
There was a problem hiding this comment.
Is CR0 32 bit on 64 bit processors?
There was a problem hiding this comment.
Hi, yeah I double checked and it turns out CR0 is indeed 64-bits, just that the top 32-bits are unusable and reserved. I'll fix this
|
Quick question, where do I put the test? I saw in the README it says that they should go in |
|
Use test/test_suite. Look at how the other asm tests are done. They basically will generate asm that LLVM then validates. And that's enough to show that they work. |
|
Thank you! |
We add x86 control registers to the register list so we can use them with inline asm
CR0is 32bit on both x86 and x86_64, that's why I registered it seperately.