[PATCH] D35984: [mips][microMIPS] Add LAPC instruction
Simon Dardis via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 5 02:28:45 PDT 2017
sdardis requested changes to this revision.
sdardis added a comment.
This revision now requires changes to proceed.
I'm seeing some test failures:
LLVM :: MC/Mips/micromips32r6/invalid-wrong-error.s
LLVM :: MC/Mips/micromips32r6/valid.s
I've highlighted the issues in inline comments.
================
Comment at: test/MC/Mips/micromips32r6/invalid-wrong-error.s:45-47
+ lapc $7, 16777216 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
+ lapc $6, -16777220 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
+ lapc $3, 3 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
----------------
Sorry about the confusion, simm19_lsl2 does give the correct error message.
These three should be in test/MC/Mips/micromips32r6/invalid.s and should be: error: expected both 19-bit signed immediate and multiple of 4
Also, test -1048580, 1048576 as they're the next multiple of 4 instead of 16777220 / 16777216.
================
Comment at: test/MC/Mips/micromips32r6/invalid-wrong-error.s:47
+ lapc $6, -16777220 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
+ lapc $3, 3 # CHECK: :[[@LINE]]:{{[0-9]+}}: error: immediate operand value out of range
----------------
Provide a negative unencodable number as well.
================
Comment at: test/MC/Mips/micromips32r6/valid.s:67-68
+ lapc $4, 100 # CHECK: lapc $4, 100 # encoding: [0x78,0x80,0x00,0x19]
+ lapc $7, 16777212 # CHECK: lapc $7, 16777212 # encoding: [0x7b,0xbf,0xff,0xff]
+ lapc $7, -16777216 # CHECK: lapc $7, -16777216 # encoding: [0x7b,0xc0,0x00,0x00]
lh $2, 8($4) # CHECK: lh $2, 8($4) # encoding: [0x3c,0x44,0x00,0x08]
----------------
The limits should be [-1048576, 1048572].
https://reviews.llvm.org/D35984
More information about the llvm-commits
mailing list