forked from OSchip/llvm-project
[AVR] Add disassembly tests for supported instructions
The disassembler of the AVR backend is incomplete: most instructions do not correctly disassemble yet. This patch is the first in a series to add disassembly support to the AVR backend. It starts with adding disassembler tests for instructions that already disassemble correctly. Differential Revision: https://reviews.llvm.org/D73911
This commit is contained in:
parent
2f1ca30f99
commit
ea8b2cb9bf
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=break -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=break < %s | llvm-objdump -d -mattr=break - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
break
|
||||
|
||||
; CHECK: break ; encoding: [0x98,0x95]
|
||||
|
||||
; CHECK-INST: break
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=des -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=des < %s | llvm-objdump -d -mattr=des - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -12,3 +13,8 @@ foo:
|
|||
; CHECK: des 6 ; encoding: [0x6b,0x94]
|
||||
; CHECK: des 1 ; encoding: [0x1b,0x94]
|
||||
; CHECK: des 8 ; encoding: [0x8b,0x94]
|
||||
|
||||
; CHECK-INST: des 0
|
||||
; CHECK-INST: des 6
|
||||
; CHECK-INST: des 1
|
||||
; CHECK-INST: des 8
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=eijmpcall -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -d -mattr=eijmpcall - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
eicall
|
||||
|
||||
; CHECK: eicall ; encoding: [0x19,0x95]
|
||||
|
||||
; CHECK-INST: eicall
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=eijmpcall -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=eijmpcall < %s | llvm-objdump -d -mattr=eijmpcall - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
eijmp
|
||||
|
||||
; CHECK: eijmp ; encoding: [0x19,0x94]
|
||||
|
||||
; CHECK-INST: eijmp
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
foo:
|
||||
|
||||
|
@ -103,3 +104,37 @@ cli
|
|||
; CHECK: clt ; encoding: [0xe8,0x94]
|
||||
; CHECK: cli ; encoding: [0xf8,0x94]
|
||||
; CHECK: cli ; encoding: [0xf8,0x94]
|
||||
|
||||
; CHECK-INST: sec
|
||||
; CHECK-INST: sec
|
||||
; CHECK-INST: sez
|
||||
; CHECK-INST: sez
|
||||
; CHECK-INST: sen
|
||||
; CHECK-INST: sen
|
||||
; CHECK-INST: sev
|
||||
; CHECK-INST: sev
|
||||
; CHECK-INST: ses
|
||||
; CHECK-INST: ses
|
||||
; CHECK-INST: seh
|
||||
; CHECK-INST: seh
|
||||
; CHECK-INST: set
|
||||
; CHECK-INST: set
|
||||
; CHECK-INST: sei
|
||||
; CHECK-INST: sei
|
||||
|
||||
; CHECK-INST: clc
|
||||
; CHECK-INST: clc
|
||||
; CHECK-INST: clz
|
||||
; CHECK-INST: clz
|
||||
; CHECK-INST: cln
|
||||
; CHECK-INST: cln
|
||||
; CHECK-INST: clv
|
||||
; CHECK-INST: clv
|
||||
; CHECK-INST: cls
|
||||
; CHECK-INST: cls
|
||||
; CHECK-INST: clh
|
||||
; CHECK-INST: clh
|
||||
; CHECK-INST: clt
|
||||
; CHECK-INST: clt
|
||||
; CHECK-INST: cli
|
||||
; CHECK-INST: cli
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=ijmpcall -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -d -mattr=ijmpcall - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
icall
|
||||
|
||||
; CHECK: icall ; encoding: [0x09,0x95]
|
||||
|
||||
; CHECK-INST: icall
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -mattr=ijmpcall -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr -mattr=ijmpcall < %s | llvm-objdump -d -mattr=ijmpcall - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
ijmp
|
||||
|
||||
; CHECK: ijmp ; encoding: [0x09,0x94]
|
||||
|
||||
; CHECK-INST: ijmp
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
nop
|
||||
|
||||
; CHECK: nop ; encoding: [0x00,0x00]
|
||||
|
||||
; CHECK-INST: nop
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
ret
|
||||
|
||||
; CHECK: ret ; encoding: [0x08,0x95]
|
||||
|
||||
; CHECK-INST: ret
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
reti
|
||||
|
||||
; CHECK: reti ; encoding: [0x18,0x95]
|
||||
|
||||
; CHECK-INST: reti
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
sleep
|
||||
|
||||
; CHECK: sleep ; encoding: [0x88,0x95]
|
||||
|
||||
; CHECK-INST: sleep
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
; RUN: llvm-mc -triple avr -show-encoding < %s | FileCheck %s
|
||||
; RUN: llvm-mc -filetype=obj -triple avr < %s | llvm-objdump -d - | FileCheck -check-prefix=CHECK-INST %s
|
||||
|
||||
|
||||
foo:
|
||||
|
@ -6,3 +7,5 @@ foo:
|
|||
wdr
|
||||
|
||||
; CHECK: wdr ; encoding: [0xa8,0x95]
|
||||
|
||||
; CHECK-INST: wdr
|
||||
|
|
Loading…
Reference in New Issue