1; RUN: llc -march=mips -target-abi o32 --mattr=+long-calls,+noabicalls < %s \ 2; RUN: -mips-jalr-reloc=false | FileCheck -check-prefix=O32 %s 3; RUN: llc -march=mips -target-abi o32 --mattr=-long-calls,+noabicalls < %s \ 4; RUN: -mips-jalr-reloc=false | FileCheck -check-prefix=O32 %s 5; RUN: llc -march=mips64 -target-abi n64 --mattr=+long-calls,+noabicalls < %s \ 6; RUN: -mips-jalr-reloc=false | FileCheck -check-prefix=N64 %s 7; RUN: llc -march=mips64 -target-abi n64 --mattr=-long-calls,+noabicalls < %s \ 8; RUN: -mips-jalr-reloc=false | FileCheck -check-prefix=N64 %s 9 10declare void @far() #0 11 12define void @near() #1 { 13 ret void 14} 15 16define void @foo() { 17 call void @far() 18 19; O32-LABEL: foo: 20; O32: lui $1, %hi(far) 21; O32-NEXT: addiu $25, $1, %lo(far) 22; O32-NEXT: jalr $25 23 24; N64-LABEL: foo: 25; N64: lui $1, %highest(far) 26; N64-NEXT: daddiu $1, $1, %higher(far) 27; N64-NEXT: dsll $1, $1, 16 28; N64-NEXT: daddiu $1, $1, %hi(far) 29; N64-NEXT: dsll $1, $1, 16 30; N64-NEXT: daddiu $25, $1, %lo(far) 31; N64-NEXT: jalr $25 32 33 call void @near() 34 35; O32: jal near 36; N64: jal near 37 38 ret void 39} 40 41attributes #0 = { "long-call" } 42attributes #1 = { "short-call" } 43