Commit 799ba673 by Karl Schimpf

Fix push/pop emit methods for ARM assembler.

These two methods introduce multiple instructions. Between each instruction a newline must be inserted, and a call to startNextInt(). This CL makes sure both cases are met. BUG=None R=stichnot@chromium.org Review URL: https://codereview.chromium.org/1441023002 .
parent bb0bacfd
......@@ -1117,9 +1117,9 @@ void InstARM32Pop::emit(const Cfg *Func) const {
for (const Operand *Op : Dests) {
if (isScalarIntegerType(Op->getType()))
continue;
startNextInst(Func);
if (NeedNewline) {
Str << "\n";
startNextInst(Func);
NeedNewline = false;
}
Str << "\t"
......@@ -1227,6 +1227,11 @@ void InstARM32Push::emit(const Cfg *Func) const {
Operand *Op = getSrc(i - 1);
if (isScalarIntegerType(Op->getType()))
continue;
if (NeedNewline) {
Str << "\n";
startNextInst(Func);
NeedNewline = false;
}
Str << "\t"
<< "vpush"
<< "\t{";
......@@ -1235,9 +1240,9 @@ void InstARM32Push::emit(const Cfg *Func) const {
NeedNewline = true;
}
if (IntegerCount != 0) {
startNextInst(Func);
if (NeedNewline) {
Str << "\n";
startNextInst(Func);
NeedNewline = false;
}
Str << "\t"
......
......@@ -49,9 +49,10 @@ define internal i64 @MulTwoI64Regs(i64 %a, i64 %b) {
; ASM-NEXT: mul r3, r0, r3
; ASM-NEXT: mla r1, r2, r1, r3
; ASM-NEXT: umull r0, r2, r0, r2
; ASM: add r2, r2, r1
; ASM-NEXT: # r2 = def.pseudo r0
; ASM-NEXT: add r2, r2, r1
; ASM-NEXT: mov r1, r2
; ASM: bx lr
; ASM-NEXT: bx lr
; DIS-LABEL:00000010 <MulTwoI64Regs>:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment