brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 4904769 Raw
40 lines · plain
1; RUN: llc -mtriple=mips < %s | FileCheck --check-prefixes=ALL,O32 %s2; RUN: llc -mtriple=mipsel < %s | FileCheck --check-prefixes=ALL,O32 %s3 4; RUN-TODO: llc -mtriple=mips64 -target-abi o32 < %s | FileCheck --check-prefixes=ALL,O32 %s5; RUN-TODO: llc -mtriple=mips64el -target-abi o32 < %s | FileCheck --check-prefixes=ALL,O32 %s6 7; RUN: llc -mtriple=mips64 -target-abi n32 < %s | FileCheck --check-prefixes=ALL,N32 %s8; RUN: llc -mtriple=mips64el -target-abi n32 < %s | FileCheck --check-prefixes=ALL,N32 %s9 10; RUN: llc -mtriple=mips64 -target-abi n64 < %s | FileCheck --check-prefixes=ALL,N64 %s11; RUN: llc -mtriple=mips64el -target-abi n64 < %s | FileCheck --check-prefixes=ALL,N64 %s12 13; Test that O32 correctly reserved space for the four arguments, even when14; there aren't any as per section 5 of MD00305 (MIPS ABIs Described).15 16declare void @foo() nounwind;17 18define void @reserved_space() nounwind {19entry:20        call void @foo()21        ret void22}23 24; ALL-LABEL: reserved_space:25; O32:           addiu $sp, $sp, -2426; O32:           sw $ra, 20($sp)27; O32:           lw $ra, 20($sp)28; O32:           addiu $sp, $sp, 2429; Despite pointers being 32-bit wide on N32, the return pointer is saved as a30; 64-bit pointer. I've yet to find a documentation reference for this quirk but31; this behaviour matches GCC so I have considered it to be correct.32; N32:           addiu $sp, $sp, -1633; N32:           sd $ra, 8($sp)34; N32:           ld $ra, 8($sp)35; N32:           addiu $sp, $sp, 1636; N64:           daddiu $sp, $sp, -1637; N64:           sd $ra, 8($sp)38; N64:           ld $ra, 8($sp)39; N64:           daddiu $sp, $sp, 1640