[PATCH] D94776: [AArch64][SVE] Asm: Fix supported immediates for DUP/CPY
Cullen Rhodes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 10 02:52:16 PST 2021
c-rhodes accepted this revision.
c-rhodes added inline comments.
This revision is now accepted and ready to land.
================
Comment at: llvm/test/MC/AArch64/SVE/dup-diagnostics.s:26
dup z0.b, #0, lsl #8 // #0, lsl #8 is not valid for .b
// CHECK: [[@LINE-1]]:{{[0-9]+}}: error: immediate must be an integer in range [-128, 255]
// CHECK-NEXT: dup z0.b, #0, lsl #8
----------------
sdesmalen wrote:
> c-rhodes wrote:
> > Do we want to update the ranges in the diagnostics? `[-255, 255]` here for instance.
> I'm not sure that's desirable, because it's not that -255 is really accepted as value -255, it's rather that #-255 is interpreted as #1 (i.e. an 8-bit value cannot represent -255). Now the accepted range is a signed byte value -128..127, or an unsigned byte value 0..255, together being -128..255.
> I'm not sure that's desirable, because it's not that -255 is really accepted as value -255, it's rather that #-255 is interpreted as #1 (i.e. an 8-bit value cannot represent -255). Now the accepted range is a signed byte value -128..127, or an unsigned byte value 0..255, together being -128..255.
Ah, so for values in the range -255..-129 they're interpreted as unsigned byte values negated. Thanks for clarifying.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94776/new/
https://reviews.llvm.org/D94776
More information about the llvm-commits
mailing list