diff --git a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp --- a/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp +++ b/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp @@ -3433,8 +3433,8 @@ getStreamer().SwitchSection(ReadOnlySection); getStreamer().EmitLabel(Sym, IDLoc); - getStreamer().EmitIntValue(HiImmOp64, 4); - getStreamer().EmitIntValue(LoImmOp64, 4); + getStreamer().EmitValueToAlignment(8); + getStreamer().EmitIntValue(ImmOp64, 8); getStreamer().SwitchSection(CS); if (emitPartialAddress(TOut, IDLoc, Sym)) @@ -3519,8 +3519,8 @@ getStreamer().SwitchSection(ReadOnlySection); getStreamer().EmitLabel(Sym, IDLoc); - getStreamer().EmitIntValue(HiImmOp64, 4); - getStreamer().EmitIntValue(LoImmOp64, 4); + getStreamer().EmitValueToAlignment(8); + getStreamer().EmitIntValue(ImmOp64, 8); getStreamer().SwitchSection(CS); if (emitPartialAddress(TOut, IDLoc, Sym)) diff --git a/llvm/test/MC/Mips/macro-li.d.s b/llvm/test/MC/Mips/macro-li.d.s --- a/llvm/test/MC/Mips/macro-li.d.s +++ b/llvm/test/MC/Mips/macro-li.d.s @@ -17,11 +17,11 @@ # N32-N64: daddiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x64] li.d $4, 1.12345 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1072822694 -# ALL: .4byte 3037400872 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4607738388174016296 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -61,11 +61,11 @@ # N32-N64: dsll $4, $4, 46 # encoding: [0xbc,0x23,0x04,0x00] li.d $4, 12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790602240 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180239360 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -93,11 +93,11 @@ # N32-N64: ld $4, 0($1) # encoding: [0x00,0x00,0x24,0xdc] li.d $4, 12345678910.0 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790602240 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180239360 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -125,11 +125,11 @@ # N32-N64: ld $4, 0($1) # encoding: [0x00,0x00,0x24,0xdc] li.d $4, 0.4 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1071225241 -# ALL: .4byte 2576980378 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4600877379321698714 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -163,11 +163,11 @@ # N32-N64: dsll $4, $4, 46 # encoding: [0xbc,0x23,0x04,0x00] li.d $4, 12345678910.12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790666967 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180304087 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -196,11 +196,11 @@ li.d $4, 12345678910123456789.12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1139108501 -# ALL: .4byte 836738583 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4892433759227321879 +# ALL-NEXT: .text # O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c] # O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16 # O32-N32-NO-PIC: addiu $1, $1, %lo([[LABEL]]) # encoding: [A,A,0x21,0x24] @@ -242,11 +242,11 @@ # N32-N64: dmtc1 $zero, $f4 # encoding: [0x00,0x20,0xa0,0x44] li.d $f4, 1.12345 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1072822694 -# ALL: .4byte 3037400872 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4607738388174016296 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -287,11 +287,11 @@ # N32-N64: dmtc1 $1, $f4 # encoding: [0x00,0x20,0xa1,0x44] li.d $f4, 12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790602240 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180239360 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -310,11 +310,11 @@ # ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16 li.d $f4, 12345678910.0 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790602240 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180239360 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -333,11 +333,11 @@ # ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16 li.d $f4, 0.4 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1071225241 -# ALL: .4byte 2576980378 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4600877379321698714 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -378,11 +378,11 @@ # N32-N64: dmtc1 $1, $f4 # encoding: [0x00,0x20,0xa1,0x44] li.d $f4, 2.515625 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1074012160 -# ALL: .4byte 0 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4612847102706319360 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -401,11 +401,11 @@ # ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16 li.d $f4, 12345678910.12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1107754720 -# ALL: .4byte 3790666967 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4757770298180304087 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf] @@ -424,11 +424,11 @@ # ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16 li.d $f4, 12345678910123456789.12345678910 -# ALL: .section .rodata,"a",@progbits -# ALL: [[LABEL:\$tmp[0-9]+]]: -# ALL: .4byte 1139108501 -# ALL: .4byte 836738583 -# ALL: .text +# ALL: .section .rodata,"a",@progbits +# ALL-NEXT: [[LABEL:\$tmp[0-9]+]]: +# ALL-NEXT: .p2align 3 +# ALL-NEXT: .8byte 4892433759227321879 +# ALL-NEXT: .text # O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f] # O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT # N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]