Hmm, I actually feel there is no need to offer an separate syntax for 64bit imm- Adjusted constant load tests.Sorry for the confusion caused by "ll". I tested your patch and found that
encoding, it might be better to offer a unified single syntax "r = signed_imm"
to the user and the encoder (BPFMCCodeEmitter::encodeInstruction) guarantee to
choose optimal encoding.
Encoder could choose BPF_ALU64 | BPF_MOV | BPF_K for both "r1 = -1" and
"r1 = -1ll" while only resorting to BPF_LD | BPF_DW | BPF_IMM when the imm really
doesn't fit into 32bit (!isInt<32>(imm_opnd)), for example, "r1 = 0x1ffffffffll".
Anyway, patch updated, changes are:
- added "ll" back.
- updated the test cases for BPF_MOV | BPF_K in ALU64 class and
BPF_IMM | BPF_DW in LD class.
- Dropped the change from "ll" to "LL". If we decided to move to "LL" which is
in consistent with LLVM generic parser then could clean this up as a
Please review, thanks.