OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [config/] [picochip/] [libgccExtras/] [adddi3.asm] - Blame information for rev 290

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 282 jeremybenn
// picoChip ASM file
2
//
3
//   Support for 64-bit addition.
4
//
5
//   Copyright (C) 2003, 2004, 2005, 2008, 2009  Free Software Foundation, Inc.
6
//   Contributed by picoChip Designs Ltd.
7
//   Maintained by Hariharan Sandanagobalane (hariharan@picochip.com)
8
//
9
//   This file is free software; you can redistribute it and/or modify it
10
//   under the terms of the GNU General Public License as published by the
11
//   Free Software Foundation; either version 3, or (at your option) any
12
//   later version.
13
//
14
//   This file is distributed in the hope that it will be useful, but
15
//   WITHOUT ANY WARRANTY; without even the implied warranty of
16
//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17
//   General Public License for more details.
18
//
19
//   Under Section 7 of GPL version 3, you are granted additional
20
//   permissions described in the GCC Runtime Library Exception, version
21
//   3.1, as published by the Free Software Foundation.
22
//
23
//   You should have received a copy of the GNU General Public License and
24
//   a copy of the GCC Runtime Library Exception along with this program;
25
//   see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
26
//   .
27
 
28
.section .text
29
 
30
.align 8
31
.global __adddi3
32
__adddi3:
33
_picoMark_FUNCTION_BEGIN=
34
 
35
// picoChip Function Prologue : &__adddi3 = 12 bytes
36
 
37
        // The first operand of add is completely in registers r[2-5]
38
        // The second operand of sub is in stack FP(0-3)
39
        // and result need to be written pointed to by the register r0.
40
        // All we need to do is to load the appropriate values, add them
41
        // appropriately (with add or addc ) and then store the values back.
42
 
43
        ldw (FP)0, r1
44
        stl r[7:6], (FP)-1
45
        add.0 r2, r1, r6
46
        ldw (FP)1, r1
47
        addc.0 r3, r1, r7
48
        ldl (FP)1, r[3:2]
49
        stl r[7:6], (r0)0
50
        addc.0 r4, r2, r6
51
        addc.0 r5, r3, r7
52
        stl r[7:6], (r0)1
53
        jr (r12)
54
=->     ldl (FP)-1, r[7:6]
55
 
56
_picoMark_FUNCTION_END=
57
 
58
// picoChip Function Epilogue : __adddi3
59
 
60
 
61
//============================================================================
62
// All DWARF information between this marker, and the END OF DWARF
63
// marker should be included in the source file. Search for
64
// FUNCTION_STACK_SIZE_GOES_HERE and FUNCTION NAME GOES HERE, and
65
// provide the relevent information. Add markers called
66
// _picoMark_FUNCTION_BEGIN and _picoMark_FUNCTION_END around the
67
// function in question.
68
//============================================================================
69
 
70
//============================================================================
71
// Frame information.
72
//============================================================================
73
 
74
.section .debug_frame
75
_picoMark_DebugFrame=
76
 
77
// Common CIE header.
78
.unalignedInitLong _picoMark_CieEnd-_picoMark_CieBegin
79
_picoMark_CieBegin=
80
.unalignedInitLong 0xffffffff
81
.initByte 0x1   // CIE Version
82
.ascii 16#0#    // CIE Augmentation
83
.uleb128 0x1    // CIE Code Alignment Factor
84
.sleb128 2      // CIE Data Alignment Factor
85
.initByte 0xc   // CIE RA Column
86
.initByte 0xc   // DW_CFA_def_cfa
87
.uleb128 0xd
88
.uleb128 0x0
89
.align 2
90
_picoMark_CieEnd=
91
 
92
// FDE
93
_picoMark_LSFDE0I900821033007563=
94
.unalignedInitLong _picoMark_FdeEnd-_picoMark_FdeBegin
95
_picoMark_FdeBegin=
96
.unalignedInitLong _picoMark_DebugFrame // FDE CIE offset
97
.unalignedInitWord _picoMark_FUNCTION_BEGIN     // FDE initial location
98
.unalignedInitWord _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
99
.initByte 0xe   // DW_CFA_def_cfa_offset
100
.uleb128 0xe    // <-- FUNCTION_STACK_SIZE_GOES_HERE
101
.initByte 0x4   // DW_CFA_advance_loc4
102
.unalignedInitLong _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
103
.initByte 0xe   // DW_CFA_def_cfa_offset
104
.uleb128 0x0
105
.align 2
106
_picoMark_FdeEnd=
107
 
108
//============================================================================
109
// Abbrevation information.
110
//============================================================================
111
 
112
.section .debug_abbrev
113
_picoMark_ABBREVIATIONS=
114
 
115
.section .debug_abbrev
116
        .uleb128 0x1    // (abbrev code)
117
        .uleb128 0x11   // (TAG: DW_TAG_compile_unit)
118
        .initByte 0x1   // DW_children_yes
119
        .uleb128 0x10   // (DW_AT_stmt_list)
120
        .uleb128 0x6    // (DW_FORM_data4)
121
        .uleb128 0x12   // (DW_AT_high_pc)
122
        .uleb128 0x1    // (DW_FORM_addr)
123
        .uleb128 0x11   // (DW_AT_low_pc)
124
        .uleb128 0x1    // (DW_FORM_addr)
125
        .uleb128 0x25   // (DW_AT_producer)
126
        .uleb128 0x8    // (DW_FORM_string)
127
        .uleb128 0x13   // (DW_AT_language)
128
        .uleb128 0x5    // (DW_FORM_data2)
129
        .uleb128 0x3    // (DW_AT_name)
130
        .uleb128 0x8    // (DW_FORM_string)
131
.initByte 0x0
132
.initByte 0x0
133
 
134
        .uleb128 0x2    ;# (abbrev code)
135
        .uleb128 0x2e   ;# (TAG: DW_TAG_subprogram)
136
.initByte 0x0   ;# DW_children_no
137
        .uleb128 0x3    ;# (DW_AT_name)
138
        .uleb128 0x8    ;# (DW_FORM_string)
139
        .uleb128 0x11   ;# (DW_AT_low_pc)
140
        .uleb128 0x1    ;# (DW_FORM_addr)
141
        .uleb128 0x12   ;# (DW_AT_high_pc)
142
        .uleb128 0x1    ;# (DW_FORM_addr)
143
.initByte 0x0
144
.initByte 0x0
145
 
146
.initByte 0x0
147
 
148
//============================================================================
149
// Line information. DwarfLib requires this to be present, but it can
150
// be empty.
151
//============================================================================
152
 
153
.section .debug_line
154
_picoMark_LINES=
155
 
156
//============================================================================
157
// Debug Information
158
//============================================================================
159
.section .debug_info
160
 
161
//Fixed header.
162
.unalignedInitLong _picoMark_DEBUG_INFO_END-_picoMark_DEBUG_INFO_BEGIN
163
_picoMark_DEBUG_INFO_BEGIN=
164
.unalignedInitWord 0x2
165
.unalignedInitLong _picoMark_ABBREVIATIONS
166
.initByte 0x2
167
 
168
// Compile unit information.
169
.uleb128 0x1    // (DIE 0xb) DW_TAG_compile_unit)
170
.unalignedInitLong _picoMark_LINES
171
.unalignedInitWord _picoMark_FUNCTION_END
172
.unalignedInitWord _picoMark_FUNCTION_BEGIN
173
// Producer is `picoChip'
174
.ascii 16#70# 16#69# 16#63# 16#6f# 16#43# 16#68# 16#69# 16#70# 16#00#
175
.unalignedInitWord 0xcafe // ASM language
176
.ascii 16#0# // Name. DwarfLib expects this to be present.
177
 
178
.uleb128 0x2    ;# (DIE DW_TAG_subprogram)
179
 
180
// FUNCTION NAME GOES HERE. Use `echo name | od -t x1' to get the hex. Each hex
181
// digit is specified using the format 16#XX#
182
.ascii 16#5f# 16#61# 16#64# 16#64# 16#63# 16#69# 16#33# 16#0# // Function name `_adddi3'
183
.unalignedInitWord _picoMark_FUNCTION_BEGIN     // DW_AT_low_pc
184
.unalignedInitWord _picoMark_FUNCTION_END       // DW_AT_high_pc
185
 
186
.initByte 0x0   // end of compile unit children.
187
 
188
_picoMark_DEBUG_INFO_END=
189
 
190
//============================================================================
191
// END OF DWARF
192
//============================================================================
193
 
194
.section .endFile

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.