1# RUN: llvm-mc -triple=mips -show-encoding -mcpu=octeon+ %s \ 2# RUN: | FileCheck -check-prefix=MIPS32 %s 3# RUN: llvm-mc -triple=mips64 -show-encoding -mcpu=octeon+ %s \ 4# RUN: | FileCheck -check-prefix=MIPS64 %s 5 6saa $2, 8($5) 7 8# MIPS32: addiu $1, $5, 8 # encoding: [0x24,0xa1,0x00,0x08] 9# MIPS32-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 10 11# MIPS64: daddiu $1, $5, 8 # encoding: [0x64,0xa1,0x00,0x08] 12# MIPS64-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 13 14saa $2, foo 15 16# MIPS32: lui $1, %hi(foo) # encoding: [0x3c,0x01,A,A] 17# MIPS32-NEXT: # fixup A - offset: 0, value: %hi(foo), kind: fixup_Mips_HI16 18# MIPS32-NEXT: addiu $1, $1, %lo(foo) # encoding: [0x24,0x21,A,A] 19# MIPS32-NEXT: # fixup A - offset: 0, value: %lo(foo), kind: fixup_Mips_LO16 20# MIPS32-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 21 22# MIPS64: lui $1, %highest(foo) # encoding: [0x3c,0x01,A,A] 23# MIPS64-NEXT: # fixup A - offset: 0, value: %highest(foo), kind: fixup_Mips_HIGHEST 24# MIPS64-NEXT: daddiu $1, $1, %higher(foo) # encoding: [0x64,0x21,A,A] 25# MIPS64-NEXT: # fixup A - offset: 0, value: %higher(foo), kind: fixup_Mips_HIGHER 26# MIPS64-NEXT: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38] 27# MIPS64-NEXT: daddiu $1, $1, %hi(foo) # encoding: [0x64,0x21,A,A] 28# MIPS64-NEXT: # fixup A - offset: 0, value: %hi(foo), kind: fixup_Mips_HI16 29# MIPS64-NEXT: dsll $1, $1, 16 # encoding: [0x00,0x01,0x0c,0x38] 30# MIPS64-NEXT: daddiu $1, $1, %lo(foo) # encoding: [0x64,0x21,A,A] 31# MIPS64-NEXT: # fixup A - offset: 0, value: %lo(foo), kind: fixup_Mips_LO16 32# MIPS64-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 33 34.option pic2 35saa $2, foo 36 37# MIPS32: lw $1, %got(foo)($gp) # encoding: [0x8f,0x81,A,A] 38# MIPS32-NEXT: # fixup A - offset: 0, value: %got(foo), kind: fixup_Mips_GOT 39# MIPS32-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 40 41# MIPS64: ld $1, %got_disp(foo)($gp) # encoding: [0xdf,0x81,A,A] 42# MIPS64-NEXT: # fixup A - offset: 0, value: %got_disp(foo), kind: fixup_Mips_GOT_DISP 43# MIPS64-NEXT: saa $2, ($1) # encoding: [0x70,0x22,0x00,0x18] 44