mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
e7d84301cc
Summary: This assembler directive marks the current label as an instruction label in microMIPS and MIPS16. This initial implementation works only for microMIPS. Reviewers: dsanders Reviewed By: dsanders Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8006 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@235084 91177308-0d34-0410-b5e6-96231b3b80d8
99 lines
1.8 KiB
ArmAsm
99 lines
1.8 KiB
ArmAsm
# RUN: llvm-mc %s -arch=mips -mcpu=mips32 | FileCheck %s --check-prefix=ASM
|
|
|
|
# RUN: llvm-mc %s -arch=mips -mcpu=mips32 -filetype=obj -o - | \
|
|
# RUN: llvm-readobj -symbols - | FileCheck %s --check-prefix=OBJ
|
|
|
|
.set micromips
|
|
|
|
.global f_mm_insn_data
|
|
.type f_mm_insn_data, @function
|
|
f_mm_insn_data:
|
|
.insn
|
|
.word 0x00e73910 # add $7, $7, $7
|
|
|
|
.global f_mm_insn_instr
|
|
.type f_mm_insn_instr, @function
|
|
f_mm_insn_instr:
|
|
.insn
|
|
add $7, $7, $7
|
|
|
|
.global o_mm_insn_data
|
|
.type o_mm_insn_data, @object
|
|
o_mm_insn_data:
|
|
.insn
|
|
.word 0x00e73910 # add $7, $7, $7
|
|
|
|
.global o_mm_insn_instr
|
|
.type o_mm_insn_instr, @object
|
|
o_mm_insn_instr:
|
|
.insn
|
|
add $7, $7, $7
|
|
|
|
.set nomicromips
|
|
|
|
.global f_normal_insn_data
|
|
.type f_normal_insn_data, @function
|
|
f_normal_insn_data:
|
|
.insn
|
|
.word 0x00e73820 # add $7, $7, $7
|
|
|
|
.global f_normal_insn_instr
|
|
.type f_normal_insn_instr, @function
|
|
f_normal_insn_instr:
|
|
.insn
|
|
add $7, $7, $7
|
|
|
|
.global o_normal_insn_data
|
|
.type o_normal_insn_data, @object
|
|
o_normal_insn_data:
|
|
.insn
|
|
.word 0x00e73820 # add $7, $7, $7
|
|
|
|
.global o_normal_insn_instr
|
|
.type o_normal_insn_instr, @object
|
|
o_normal_insn_instr:
|
|
.insn
|
|
add $7, $7, $7
|
|
|
|
# Verify that .insn causes the currently saved labels to be cleared by checking
|
|
# that foo doesn't get marked.
|
|
.set nomicromips
|
|
foo:
|
|
.insn
|
|
.word 0x00e73820 # add $7, $7, $7
|
|
|
|
.set micromips
|
|
bar:
|
|
add $7, $7, $7
|
|
|
|
# ASM: .insn
|
|
|
|
# OBJ: Symbols [
|
|
# OBJ: Name: foo
|
|
# OBJ: Other: 0
|
|
|
|
# OBJ: Name: f_mm_insn_data
|
|
# OBJ: Other: 128
|
|
|
|
# OBJ: Name: f_mm_insn_instr
|
|
# OBJ: Other: 128
|
|
|
|
# OBJ: Name: f_normal_insn_data
|
|
# OBJ: Other: 0
|
|
|
|
# OBJ: Name: f_normal_insn_instr
|
|
# OBJ: Other: 0
|
|
|
|
# OBJ: Name: o_mm_insn_data
|
|
# OBJ: Other: 128
|
|
|
|
# OBJ: Name: o_mm_insn_instr
|
|
# OBJ: Other: 128
|
|
|
|
# OBJ: Name: o_normal_insn_data
|
|
# OBJ: Other: 0
|
|
|
|
# OBJ: Name: o_normal_insn_instr
|
|
# OBJ: Other: 0
|
|
# OBJ: ]
|