<div dir="ltr"><div><div><div><div><div><div><div>Dear all,<br><br></div>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!<br><br></div>for example for a i8imm imm value (bits<8> val) these two produce the same output:<br><br></div>add r0 0<br></div>add r0 256<br><br></div>whose responsibility is to check the integer boundary in the assembly parser?<br><br></div>Cheers,<br></div>ES<br></div>