197 lines · plain
1# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -target-abi=o32 | FileCheck %s --check-prefixes=ALL,O32-N32-NO-PIC2# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -target-abi=o32 -position-independent | FileCheck %s --check-prefixes=ALL,O32-N32-PIC3# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64 -target-abi=n32 | FileCheck %s --check-prefixes=ALL,O32-N32-NO-PIC4# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64 -target-abi=n32 -position-independent | FileCheck %s --check-prefixes=ALL,O32-N32-PIC5# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64 -target-abi=n64 | FileCheck %s --check-prefixes=ALL,N64-NO-PIC6# RUN: llvm-mc %s -triple=mipsel-unknown-linux -show-encoding -mcpu=mips64 -target-abi=n64 -position-independent | FileCheck %s --check-prefixes=ALL,N64-PIC7 8li.s $4, 09# ALL: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]10 11li.s $4, 0.012# ALL: addiu $4, $zero, 0 # encoding: [0x00,0x00,0x04,0x24]13 14li.s $4, 1.1234515# ALL: lui $4, 16271 # encoding: [0x8f,0x3f,0x04,0x3c]16# ALL: ori $4, $4, 52534 # encoding: [0x36,0xcd,0x84,0x34]17 18li.s $4, 119# ALL: lui $4, 16256 # encoding: [0x80,0x3f,0x04,0x3c]20 21li.s $4, 1.022# ALL: lui $4, 16256 # encoding: [0x80,0x3f,0x04,0x3c]23 24li.s $4, 1234567891025# ALL: lui $4, 20535 # encoding: [0x37,0x50,0x04,0x3c]26# ALL: ori $4, $4, 63239 # encoding: [0x07,0xf7,0x84,0x34]27 28li.s $4, 12345678910.029# ALL: lui $4, 20535 # encoding: [0x37,0x50,0x04,0x3c]30# ALL: ori $4, $4, 63239 # encoding: [0x07,0xf7,0x84,0x34]31 32li.s $4, 0.433# ALL: lui $4, 16076 # encoding: [0xcc,0x3e,0x04,0x3c]34# ALL: ori $4, $4, 52429 # encoding: [0xcd,0xcc,0x84,0x34]35 36li.s $4, 1.537# ALL: lui $4, 16320 # encoding: [0xc0,0x3f,0x04,0x3c]38 39li.s $4, 12345678910.1234567891040# ALL: lui $4, 20535 # encoding: [0x37,0x50,0x04,0x3c]41# ALL: ori $4, $4, 63239 # encoding: [0x07,0xf7,0x84,0x34]42 43li.s $4, 12345678910123456789.1234567891044# ALL: lui $4, 24363 # encoding: [0x2b,0x5f,0x04,0x3c]45# ALL: ori $4, $4, 21674 # encoding: [0xaa,0x54,0x84,0x34]46 47li.s $f4, 048# ALL: mtc1 $zero, $f4 # encoding: [0x00,0x20,0x80,0x44]49 50li.s $f4, 0.051# ALL: mtc1 $zero, $f4 # encoding: [0x00,0x20,0x80,0x44]52 53li.s $f4, 1.1234554# ALL: .section .rodata,"a",@progbits55# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:56# ALL: .4byte 106638879057# ALL: .text58# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]59# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT60# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]61# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI1662# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]63# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT64# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]65# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST66# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]67# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER68# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]69# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]70# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI1671# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]72# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]73# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO1674 75li.s $f4, 176# ALL: lui $1, 16256 # encoding: [0x80,0x3f,0x01,0x3c]77# ALL: mtc1 $1, $f4 # encoding: [0x00,0x20,0x81,0x44]78 79li.s $f4, 1.080# ALL: lui $1, 16256 # encoding: [0x80,0x3f,0x01,0x3c]81# ALL: mtc1 $1, $f4 # encoding: [0x00,0x20,0x81,0x44]82 83li.s $f4, 1234567891084# ALL: .section .rodata,"a",@progbits85# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:86# ALL: .4byte 134584499987# ALL: .text88# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]89# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT90# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]91# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI1692# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]93# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT94# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]95# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST96# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]97# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER98# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]99# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]100# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16101# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]102# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]103# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16104 105li.s $f4, 12345678910.0106# ALL: .section .rodata,"a",@progbits107# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:108# ALL: .4byte 1345844999109# ALL: .text110# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]111# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT112# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]113# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16114# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]115# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT116# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]117# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST118# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]119# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER120# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]121# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]122# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16123# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]124# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]125# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16126 127 128li.s $f4, 0.4129# ALL: .section .rodata,"a",@progbits130# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:131# ALL: .4byte 1053609165132# ALL: .text133# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]134# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT135# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]136# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16137# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]138# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT139# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]140# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST141# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]142# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER143# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]144# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]145# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16146# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]147# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]148# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16149 150li.s $f4, 1.5151# ALL: lui $1, 16320 # encoding: [0xc0,0x3f,0x01,0x3c]152# ALL: mtc1 $1, $f4 # encoding: [0x00,0x20,0x81,0x44]153 154li.s $f4, 12345678910.12345678910155# ALL: .section .rodata,"a",@progbits156# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:157# ALL: .4byte 1345844999158# ALL: .text159# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]160# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT161# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]162# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16163# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]164# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT165# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]166# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST167# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]168# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER169# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]170# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]171# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16172# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]173# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]174# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16175 176li.s $f4, 12345678910123456789.12345678910177# ALL: .section .rodata,"a",@progbits178# ALL: [[LABEL:((\$)|(\.L))tmp[0-9]+]]:179# ALL: .4byte 1596675242180# ALL: .text181# O32-N32-PIC: lw $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0x8f]182# O32-N32-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT183# O32-N32-NO-PIC: lui $1, %hi([[LABEL]]) # encoding: [A,A,0x01,0x3c]184# O32-N32-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16185# N64-PIC: ld $1, %got([[LABEL]])($gp) # encoding: [A,A,0x81,0xdf]186# N64-PIC: # fixup A - offset: 0, value: %got([[LABEL]]), kind: fixup_Mips_GOT187# N64-NO-PIC: lui $1, %highest([[LABEL]]) # encoding: [A,A,0x01,0x3c]188# N64-NO-PIC: # fixup A - offset: 0, value: %highest([[LABEL]]), kind: fixup_Mips_HIGHEST189# N64-NO-PIC: daddiu $1, $1, %higher([[LABEL]]) # encoding: [A,A,0x21,0x64]190# N64-NO-PIC: # fixup A - offset: 0, value: %higher([[LABEL]]), kind: fixup_Mips_HIGHER191# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]192# N64-NO-PIC: daddiu $1, $1, %hi([[LABEL]]) # encoding: [A,A,0x21,0x64]193# N64-NO-PIC: # fixup A - offset: 0, value: %hi([[LABEL]]), kind: fixup_Mips_HI16194# N64-NO-PIC: dsll $1, $1, 16 # encoding: [0x38,0x0c,0x01,0x00]195# ALL: lwc1 $f4, %lo([[LABEL]])($1) # encoding: [A,A,0x24,0xc4]196# ALL: # fixup A - offset: 0, value: %lo([[LABEL]]), kind: fixup_Mips_LO16197