[PATCH] D24667: [mips][ias] Handle more complicated expressions for memory operands
Vasileios Kalintiris via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 06:36:12 PDT 2016
vkalintiris accepted this revision.
vkalintiris added a comment.
This revision is now accepted and ready to land.
Comment at: lib/Target/Mips/AsmParser/MipsAsmParser.cpp:4447-4453
+ case AsmToken::EqualEqual: Opcode = MCBinaryExpr::EQ; break;
+ case AsmToken::ExclaimEqual: Opcode = MCBinaryExpr::NE; break;
+ case AsmToken::Less: Opcode = MCBinaryExpr::LT; break;
+ case AsmToken::LessEqual: Opcode = MCBinaryExpr::LTE; break;
+ case AsmToken::LessLess: Opcode = MCBinaryExpr::Shl; break;
+ case AsmToken::Greater: Opcode = MCBinaryExpr::GT; break;
+ case AsmToken::GreaterEqual: Opcode = MCBinaryExpr::GTE; break;
> vkalintiris wrote:
> > We should test the comparison/equality operators in MC/Mips/memory-offsets.s as well. Can you check that we follow the GNU assembler behaviour for these?
> I remember why I didn't test them in memory-offsets.s now. IAS will resolve the result of the comparison to '1' or '0'. GAS behaves oddly and gives 0 or -1. Given the differences, I think I should drop them altogether as I'm struggling to comprehend why someone would use a relational operator in a memory offset.
I think we should drop them too. Maybe we should add a comment at the top of the switch statement to remember the difference.
More information about the llvm-commits