2015-07-14 20:24:22 +08:00
|
|
|
# RUN: not llvm-mc %s -arch=mips -mcpu=mips32r2 2>%t1
|
2019-11-12 05:10:31 +08:00
|
|
|
# RUN: FileCheck %s < %t1 --check-prefix=O32
|
2015-07-14 20:24:22 +08:00
|
|
|
# RUN: not llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n32 2>&1 | \
|
2015-08-17 18:11:55 +08:00
|
|
|
# RUN: FileCheck %s --check-prefix=N32
|
2019-11-12 05:10:31 +08:00
|
|
|
# RUN: llvm-mc %s -arch=mips64 -mcpu=mips64 -target-abi n64 2>&1 | \
|
2015-08-17 18:11:55 +08:00
|
|
|
# RUN: FileCheck %s --check-prefix=N64
|
2015-07-14 20:24:22 +08:00
|
|
|
|
|
|
|
.text
|
|
|
|
la $5, 0x100000000
|
2015-08-17 18:11:55 +08:00
|
|
|
# O32: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
|
|
|
|
# N32: :[[@LINE-2]]:3: error: instruction requires a 32-bit immediate
|
2019-11-12 05:10:31 +08:00
|
|
|
# N64: :[[@LINE-3]]:3: warning: la used to load 64-bit address
|
2015-08-17 18:11:55 +08:00
|
|
|
|
2015-07-14 20:24:22 +08:00
|
|
|
la $5, 0x100000000($6)
|
2015-08-17 18:11:55 +08:00
|
|
|
# O32: :[[@LINE-1]]:3: error: instruction requires a 32-bit immediate
|
|
|
|
# N32: :[[@LINE-2]]:3: error: instruction requires a 32-bit immediate
|
2019-11-12 05:10:31 +08:00
|
|
|
# N64: :[[@LINE-3]]:3: warning: la used to load 64-bit address
|
2015-08-17 18:11:55 +08:00
|
|
|
|
2015-07-14 20:24:22 +08:00
|
|
|
la $5, symbol
|
2019-11-12 05:10:31 +08:00
|
|
|
# N32-NOT: :[[@LINE-1]]:3: warning: la used to load 64-bit address
|
|
|
|
# N64: :[[@LINE-2]]:3: warning: la used to load 64-bit address
|