[llvm-dev] Immediate value boundary checking
Sky Flyer via llvm-dev
llvm-dev at lists.llvm.org
Mon Dec 7 03:51:27 PST 2015
Dear all,
I have written an assembler which reads assembly instructions and produces
the equivalent binary. I have a problem. Although I set the bit range and
immediate type for an instruction like add which accepts a register and an
immediate value, I can simply overflow that value and llvm/tablegen doesn't
care!
for example for a i8imm imm value (bits<8> val) these two produce the same
output:
add r0 0
add r0 256
whose responsibility is to check the integer boundary in the assembly
parser?
Cheers,
ES
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20151207/3fdff87e/attachment.html>
More information about the llvm-dev
mailing list