|
1 | 1 | ; RUN: llc -mtriple=mips-elf < %s | FileCheck %s -check-prefix=O32
|
2 | 2 | ; RUN: llc -mtriple=mips64-elf -target-abi=n32 < %s | FileCheck %s -check-prefix=N32
|
3 | 3 | ; RUN: llc -mtriple=mips64-elf < %s | FileCheck %s -check-prefix=N64
|
| 4 | +; RUN: llc -mtriple=mipsel-windows-gnu < %s | FileCheck %s -check-prefix=MIPSEL |
4 | 5 |
|
5 | 6 | ; We only use the '$' prefix on O32. The others use the ELF convention.
|
6 | 7 | ; O32: $JTI0_0
|
|
12 | 13 | ; N32: .LBB0_2:
|
13 | 14 | ; N64: .LBB0_2:
|
14 | 15 |
|
| 16 | +; MIPSEL-LABEL: _Z3foo: |
| 17 | +; MIPSEL: # %bb.0: # %entry |
| 18 | +; MIPSEL-NEXT: addiu $sp, $sp, -16 |
| 19 | +; MIPSEL-NEXT: sltiu $1, $4, 7 |
| 20 | +; MIPSEL-NEXT: beqz $1, .LBB0_6 |
| 21 | +; MIPSEL-NEXT: sw $4, 4($sp) |
| 22 | +; MIPSEL-NEXT: # %bb.1: # %entry |
| 23 | +; MIPSEL-NEXT: sll $1, $4, 2 |
| 24 | +; MIPSEL-NEXT: lui $2, %hi($JTI0_0) |
| 25 | +; MIPSEL-NEXT: addu $1, $1, $2 |
| 26 | +; MIPSEL-NEXT: lw $1, %lo($JTI0_0)($1) |
| 27 | +; MIPSEL-NEXT: jr $1 |
| 28 | +; MIPSEL-NEXT: nop |
| 29 | +; MIPSEL-NEXT: .LBB0_2: # %sw.bb |
| 30 | +; MIPSEL-NEXT: lui $1, %hi($.str) |
| 31 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str) |
| 32 | +; MIPSEL-NEXT: j .LBB0_10 |
| 33 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 34 | +; MIPSEL-NEXT: .LBB0_3: # %sw.bb4 |
| 35 | +; MIPSEL-NEXT: lui $1, %hi($.str.4) |
| 36 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.4) |
| 37 | +; MIPSEL-NEXT: j .LBB0_10 |
| 38 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 39 | +; MIPSEL-NEXT: .LBB0_4: # %sw.bb2 |
| 40 | +; MIPSEL-NEXT: lui $1, %hi($.str.2) |
| 41 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.2) |
| 42 | +; MIPSEL-NEXT: j .LBB0_10 |
| 43 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 44 | +; MIPSEL-NEXT: .LBB0_5: # %sw.bb3 |
| 45 | +; MIPSEL-NEXT: lui $1, %hi($.str.3) |
| 46 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.3) |
| 47 | +; MIPSEL-NEXT: j .LBB0_10 |
| 48 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 49 | +; MIPSEL-NEXT: .LBB0_6: # %sw.epilog |
| 50 | +; MIPSEL-NEXT: lui $1, %hi($.str.7) |
| 51 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.7) |
| 52 | +; MIPSEL-NEXT: j .LBB0_10 |
| 53 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 54 | +; MIPSEL-NEXT: .LBB0_7: # %sw.bb1 |
| 55 | +; MIPSEL-NEXT: lui $1, %hi($.str.1) |
| 56 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.1) |
| 57 | +; MIPSEL-NEXT: j .LBB0_10 |
| 58 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 59 | +; MIPSEL-NEXT: .LBB0_8: # %sw.bb5 |
| 60 | +; MIPSEL-NEXT: lui $1, %hi($.str.5) |
| 61 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.5) |
| 62 | +; MIPSEL-NEXT: j .LBB0_10 |
| 63 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 64 | +; MIPSEL-NEXT: .LBB0_9: # %sw.bb6 |
| 65 | +; MIPSEL-NEXT: lui $1, %hi($.str.6) |
| 66 | +; MIPSEL-NEXT: addiu $1, $1, %lo($.str.6) |
| 67 | +; MIPSEL-NEXT: sw $1, 8($sp) |
| 68 | +; MIPSEL-NEXT: .LBB0_10: # %return |
| 69 | +; MIPSEL-NEXT: lw $2, 8($sp) |
| 70 | +; MIPSEL-NEXT: jr $ra |
| 71 | +; MIPSEL-NEXT: addiu $sp, $sp, 16 |
| 72 | + |
15 | 73 | @.str = private unnamed_addr constant [2 x i8] c"A\00", align 1
|
16 | 74 | @.str.1 = private unnamed_addr constant [2 x i8] c"B\00", align 1
|
17 | 75 | @.str.2 = private unnamed_addr constant [2 x i8] c"C\00", align 1
|
|
21 | 79 | @.str.6 = private unnamed_addr constant [2 x i8] c"G\00", align 1
|
22 | 80 | @.str.7 = private unnamed_addr constant [1 x i8] zeroinitializer, align 1
|
23 | 81 |
|
24 |
| -define ptr @_Z3fooi(i32 signext %Letter) { |
| 82 | +define ptr @_Z3foo(i32 signext %Letter) { |
25 | 83 | entry:
|
26 | 84 | %retval = alloca ptr, align 8
|
27 | 85 | %Letter.addr = alloca i32, align 4
|
|
0 commit comments