docs: add caller-side rejection tests to M2
This commit is contained in:
1 parent
469b1d870e
commit
e7ba50d7a3
1 file changed
+43
-2
@@ -46,7 +46,7 @@
|
||||
**Files:**
|
||||
- Delete: `build/llvm-clean/llvm/test/CodeGen/TMS34010/m1-*.ll` (compiler repo; the `m1` branch keeps them)
|
||||
- Create: `build/llvm-clean/llvm/test/CodeGen/TMS34010/m2-add.ll`, `m2-load.ll`, `m2-char.ll`, `m2-i16.ll`, `m2-store.ll`, `m2-global.ll`, `m2-late-gep.ll`, `m2-reject-i64.ll`, `m2-reject-struct.ll`, `m2-reject-vararg.ll`, `m2-reject-sret.ll`, `m2-reject-structret.ll`
|
||||
- Create: `m2-args.ll`, `m2-noret.ll`, `m2-locals.ll`, `m2-args-locals.ll`, `m2-call.ll`, `m2-call3.ll`, `m2-callee-save.ll`, `m2-fs1.ll`, `m2-spill.ll`, `m2-data.ll`, `m2-string.ll`, `m2-ptrinit.ll`, `m2-reject-arg8.ll`, `m2-reject-i8ret.ll`, `m2-reject-float.ll`
|
||||
- Create: `m2-args.ll`, `m2-noret.ll`, `m2-locals.ll`, `m2-args-locals.ll`, `m2-call.ll`, `m2-call3.ll`, `m2-callee-save.ll`, `m2-fs1.ll`, `m2-spill.ll`, `m2-data.ll`, `m2-string.ll`, `m2-ptrinit.ll`, `m2-reject-arg8.ll`, `m2-reject-i8ret.ll`, `m2-reject-float.ll`, `m2-reject-call-indirect.ll`, `m2-reject-call-arg8.ll`, `m2-reject-call-vararg.ll`
|
||||
- Test: the `m2-*` filter in `build/llvm-clean-build/test/CodeGen/TMS34010`
|
||||
|
||||
**Interfaces:**
|
||||
@@ -119,6 +119,47 @@ entry:
|
||||
}
|
||||
```
|
||||
|
||||
`m2-reject-call-arg8.ll` (narrow call arguments are rejected at the call site):
|
||||
|
||||
```llvm
|
||||
; RUN: not llc -march=tms34010 -O0 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; RUN: not llc -march=tms34010 -O2 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; CHECK: M2 supports only i32 and pointer call arguments
|
||||
declare void @g8(i8)
|
||||
define void @f() {
|
||||
entry:
|
||||
call void @g8(i8 1)
|
||||
ret void
|
||||
}
|
||||
```
|
||||
|
||||
`m2-reject-call-vararg.ll` (a variadic call, distinct from a variadic definition):
|
||||
|
||||
```llvm
|
||||
; RUN: not llc -march=tms34010 -O0 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; RUN: not llc -march=tms34010 -O2 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; CHECK: M2 does not support varargs
|
||||
declare void @g(i32, ...)
|
||||
define void @f() {
|
||||
entry:
|
||||
call void @g(i32 1, i32 2)
|
||||
ret void
|
||||
}
|
||||
```
|
||||
|
||||
`m2-reject-call-indirect.ll` (no indirect calls in M2):
|
||||
|
||||
```llvm
|
||||
; RUN: not llc -march=tms34010 -O0 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; RUN: not llc -march=tms34010 -O2 -filetype=asm < %s 2>&1 | FileCheck %s
|
||||
; CHECK: M2 supports only direct calls to global functions
|
||||
define i32 @indirect(ptr %f) {
|
||||
entry:
|
||||
%r = call i32 %f(i32 1)
|
||||
ret i32 %r
|
||||
}
|
||||
```
|
||||
|
||||
`m2-args.ll`:
|
||||
|
||||
```llvm
|
||||
@@ -536,7 +577,7 @@ git -C build/llvm-clean commit -m "tms34010: TI ABI callee frames, arguments and
|
||||
**Files:**
|
||||
- Modify: `build/llvm-clean/llvm/lib/Target/TMS34010/TMS34010ISelLowering.cpp`
|
||||
- Modify: `TMS34010InstrInfo.td` / `TMS34010MCInstLower.cpp` if `CALLA` symbol lowering needs it
|
||||
- Test: `m2-call.ll`, `m2-call3.ll`, `m2-callee-save.ll`, `m2-fs1.ll`, `m2-spill.ll`
|
||||
- Test: `m2-call.ll`, `m2-call3.ll`, `m2-callee-save.ll`, `m2-fs1.ll`, `m2-spill.ll`, `m2-reject-call-indirect.ll`, `m2-reject-call-arg8.ll`, `m2-reject-call-vararg.ll`
|
||||
|
||||
**Interfaces:**
|
||||
- Consumes: Task 2's `PUSH32`, `PUSHARG`, `LOADSTK`, `SETF32`, `CALLA`, frames, A8 return.
|
||||
|
||||
Reference in new issue
Block a user