search for: sub16u

Displaying 5 results from an estimated 5 matches for "sub16u".

2017 Feb 15
5
Unsigned int displaying as negative
Where does the unsignedSub come from? On 2017-02-15 20:38, Ryan Taylor wrote: > Sorry, it should be: > > defm SUB16u_ : ABD_NonCommutative<"sub16u", unsignedSub, LOADRegs, > GPRRegs, DSTRegs, i16, i16, i16, uimm16, immZExt16x>; > > On Wed, Feb 15, 2017 at 2:37 PM, Ryan Taylor <ryta1203 at gmail.com> > wrote: > >> I see. If I put simm16 and immSExt16x in place of uimm...
2017 Feb 15
4
Unsigned int displaying as negative
I see. If I put simm16 and immSExt16x in place of uimm16 and immZExt16x respectively, the imm matches but it prints out -32768 (which is invalid for sub16u). We are using uimm16 not match unsigned but for PrintMethod, effectively uimm16 and simm16 are both Operand<i16>. I'm still unclear why simm16 matches and uimm16 does not. Here is the pattern if that helps at all. So just as a reference: def simm16 : Operand<i16> { let Dec...
2017 Feb 15
6
Unsigned int displaying as negative
...nd that it's just being printed as 'signed' even when it's unsigned due to the bit pattern (2s complement) but it seems to affect matching. We'd like; unsigned short x, y; int main() { unsigned short w = 0x8000; y = w - x; return 0; } To match to something like 'sub16u $0x8000, x, y' (if I set w = 0x7FFF, then we get sub16u $0x7FFF, x, y' but not when using 0x8000). We have some code to determine if the operation is a signed or unsigned operation in tablegen. Can anyone suggest a good way to get around this? Thanks, Ryan -------------- next part -------...
2017 Feb 15
2
Unsigned int displaying as negative
...n (2s complement) but it seems to affect >> matching. >> >> We'd like; >> >> unsigned short x, y; >> int main() { >> unsigned short w = 0x8000; >> y = w - x; >> return 0; >> } >> >> To match to something like 'sub16u $0x8000, x, y' (if I set w = 0x7FFF, >> then we get sub16u $0x7FFF, x, y' but not when using 0x8000). >> >> We have some code to determine if the operation is a signed or unsigned >> operation in tablegen. Can anyone suggest a good way to get around this? >> &g...
2017 Feb 15
2
Unsigned int displaying as negative
...n (2s complement) but it seems to affect >> matching. >> >> We'd like; >> >> unsigned short x, y; >> int main() { >> unsigned short w = 0x8000; >> y = w - x; >> return 0; >> } >> >> To match to something like 'sub16u $0x8000, x, y' (if I set w = 0x7FFF, >> then we get sub16u $0x7FFF, x, y' but not when using 0x8000). >> >> We have some code to determine if the operation is a signed or unsigned >> operation in tablegen. Can anyone suggest a good way to get around this? >> &g...