mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-31 16:02:52 +01:00
c50372298d
1. A delay slot filler that searches for valid instructions to fill the delay slot with. Previously NOPs would always be inserted into delay slots. 2. Support for MC based instruction printer added. 3. Support for MC based machine code generation and ELF file generation. ELF file generation does not yet completely work as much of the ELF support infrastructure is still x86/x86-64 specific. 4. General clean up of the MBlaze backend code. Much of the tablegen code has been cleanup and simplified. Bug Fixes: 1. Removed duplicate periods from subtarget feature descriptions. 2. Many of the instructions had bad machine code information in the tablegen files. Much of this has been fixed. llvm-svn: 116986
71 lines
1.7 KiB
LLVM
71 lines
1.7 KiB
LLVM
; Ensure that all immediate values that are 32-bits or less can be loaded
|
|
; using a single instruction and that immediate values 64-bits or less can
|
|
; be loaded using two instructions.
|
|
;
|
|
; RUN: llc < %s -march=mblaze | FileCheck %s
|
|
; RUN: llc < %s -march=mblaze -mattr=+fpu | FileCheck -check-prefix=FPU %s
|
|
|
|
define i8 @retimm_i8() {
|
|
; CHECK: retimm_i8:
|
|
; CHECK: rtsd
|
|
; CHECK-NEXT: add
|
|
; FPU: retimm_i8:
|
|
; FPU: rtsd
|
|
; FPU-NEXT: add
|
|
ret i8 123
|
|
}
|
|
|
|
define i16 @retimm_i16() {
|
|
; CHECK: retimm_i16:
|
|
; CHECK: rtsd
|
|
; CHECK-NEXT: add
|
|
; FPU: retimm_i16:
|
|
; FPU: rtsd
|
|
; FPU-NEXT: add
|
|
ret i16 38212
|
|
}
|
|
|
|
define i32 @retimm_i32() {
|
|
; CHECK: retimm_i32:
|
|
; CHECK: add
|
|
; CHECK-NEXT: rtsd
|
|
; FPU: retimm_i32:
|
|
; FPU: add
|
|
; FPU-NEXT: rtsd
|
|
ret i32 2938128
|
|
}
|
|
|
|
define i64 @retimm_i64() {
|
|
; CHECK: retimm_i64:
|
|
; CHECK: add
|
|
; CHECK-NEXT: rtsd
|
|
; CHECK-NEXT: add
|
|
; FPU: retimm_i64:
|
|
; FPU: add
|
|
; FPU-NEXT: rtsd
|
|
; FPU-NEXT: add
|
|
ret i64 94581823
|
|
}
|
|
|
|
define float @retimm_float() {
|
|
; CHECK: retimm_float:
|
|
; CHECK: add
|
|
; CHECK-NEXT: rtsd
|
|
; FPU: retimm_float:
|
|
; FPU: or
|
|
; FPU-NEXT: rtsd
|
|
ret float 12.0
|
|
}
|
|
|
|
define double @retimm_double() {
|
|
; CHECK: retimm_double:
|
|
; CHECK: add
|
|
; CHECK-NEXT: add
|
|
; CHECK-NEXT: rtsd
|
|
; FPU: retimm_double:
|
|
; FPU: add
|
|
; FPU-NEXT: add
|
|
; FPU-NEXT: rtsd
|
|
ret double 598382.39283873
|
|
}
|