]> Git Repo - binutils.git/blob - sim/testsuite/microblaze/testutils.inc
Automatic date update in version.in
[binutils.git] / sim / testsuite / microblaze / testutils.inc
1 # MACRO: system_call
2 # Make a libgloss/Linux system call
3         .macro system_call nr:req
4         addi r12, r0, \nr;
5         brki r14, 8;
6         .endm
7
8 # MACRO: exit
9         .macro exit nr:req
10         addi r3, r0, \nr;
11         bri 0;
12         .endm
13
14 # MACRO: pass
15 # Write 'pass' to stdout and quit
16         .macro pass
17         write 1, 1f, 5
18         exit 0
19         .data
20         1: .asciz "pass\n"
21         .endm
22
23 # MACRO: fail
24 # Write 'fail' to stdout and quit
25         .macro fail
26         write 1, 1f, 5
27         exit 1
28         .data
29         1: .asciz "fail\n"
30         .endm
31
32 # MACRO: start
33 # All assembler tests should start with a call to "start"
34         .macro start
35         .text
36 .global _start
37 _start:
38         .endm
39
40 # MACRO: write
41 # Just like the write() C function; uses system calls
42         .macro write fd:req, buf:req, count:req
43         addi r5, r0, \fd;
44         addi r6, r0, \buf;
45         addi r7, r0, \count;
46         system_call 5
47         .endm
This page took 0.026502 seconds and 4 git commands to generate.