/[gxemul]/upstream/0.3.3.1/tests/test_daddu.S
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /upstream/0.3.3.1/tests/test_daddu.S

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (hide annotations)
Mon Oct 8 16:18:14 2007 UTC (16 years, 7 months ago) by dpavlin
File size: 828 byte(s)
0.3.3.1
1 dpavlin 2 /*
2     * $Id: test_daddu.S,v 1.1 2004/08/22 21:28:31 debug Exp $
3     *
4     * Instruction: 'daddu' (64-bit add, no overflow exception)
5     */
6    
7     .rdata
8     .align 3
9     $NL: .ascii "\n"
10    
11     .text
12     .align 4
13     .globl testmain
14     .ent testmain
15     testmain:
16     /* Save the return address: */
17     addiu $29,$29,-16
18     sd $31,0($29)
19    
20    
21     dli $6, 0x12345678
22     dli $7, 0x9abcdef0
23     daddu $4, $6, $7
24    
25     addiu $5, $0, 8
26     jal printhex
27    
28     dla $4, $NL
29     jal printstr
30    
31    
32     dli $6, 0x12345678
33     dli $7, -0x9abcdef0
34     daddu $4, $6, $7
35    
36     addiu $5, $0, 8
37     jal printhex
38    
39     dla $4, $NL
40     jal printstr
41    
42    
43     dli $6, 0x123456789abc
44     dli $7, 0xffffffff8888
45     daddu $4, $6, $7
46    
47     addiu $5, $0, 8
48     jal printhex
49    
50     dla $4, $NL
51     jal printstr
52    
53    
54     /* Return value: */
55     li $2, 0x1212fefe
56    
57     /* Restore the return address: */
58     ld $31,0($29)
59     addiu $29,$29,16
60    
61     /* ... and return. */
62     jr $31
63    
64     .end testmain
65    

  ViewVC Help
Powered by ViewVC 1.1.26