OSDN Git Service

2008-09-03 Hari Sandanagobalane <hariharan@picochip.com>
[pf3gnuchains/gcc-fork.git] / config / picochip / libgccExtras / longjmp.asm
1 // picoChip ASM file
2 //
3 //   Support for 32-bit arithmetic shift right.
4 //
5 //   Copyright (C) 2003, 2004, 2005  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 2, or (at your option) any
12 //   later version.
13 //
14 //   In addition to the permissions in the GNU General Public License, the
15 //   Free Software Foundation gives you unlimited permission to link the
16 //   compiled version of this file into combinations with other programs,
17 //   and to distribute those combinations without any restriction coming
18 //   from the use of this file.  (The General Public License restrictions
19 //   do apply in other respects; for example, they cover modification of
20 //   the file, and distribution when not linked into a combine
21 //   executable.)
22 //
23 //   This file is distributed in the hope that it will be useful, but
24 //   WITHOUT ANY WARRANTY; without even the implied warranty of
25 //   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
26 //   General Public License for more details.
27 //
28 //   You should have received a copy of the GNU General Public License
29 //   along with this program; see the file COPYING.  If not, write to
30 //   the Free Software Foundation, 51 Franklin Street, Fifth Floor,
31 //   Boston, MA 02110-1301, USA.
32
33 .section .text
34
35 .global _longjmp
36 _longjmp:
37 _picoMark_FUNCTION_BEGIN=
38
39 // picoChip Function Prologue : &_longjmp = 0 bytes
40
41         LDL (R0)0, R[3:2]
42         LDL (R0)1, R[5:4]
43         LDL (R0)2, R[7:6]
44         LDL (R0)3, R[9:8]
45         LDL (R0)4, R[11:10]
46         LDL (R0)5, R[13:12]
47         LDW (R0)12, R14
48         LDW (R0)13, R1
49         JR (R12)
50 =->     COPY.0 1,R0
51         
52 // picoChip Function Epilogue : longjmp
53 //============================================================================
54 // All DWARF information between this marker, and the END OF DWARF
55 // marker should be included in the source file. Search for
56 // FUNCTION_STACK_SIZE_GOES_HERE and FUNCTION NAME GOES HERE, and
57 // provide the relevent information. Add markers called
58 // _picoMark_FUNCTION_BEGIN and _picoMark_FUNCTION_END around the
59 // function in question.
60 //============================================================================
61
62 //============================================================================
63 // Frame information. 
64 //============================================================================
65
66 .section .debug_frame
67 _picoMark_DebugFrame=
68
69 // Common CIE header.
70 .unalignedInitLong _picoMark_CieEnd-_picoMark_CieBegin
71 _picoMark_CieBegin=
72 .unalignedInitLong 0xffffffff
73 .initByte 0x1   // CIE Version
74 .ascii 16#0#    // CIE Augmentation
75 .uleb128 0x1    // CIE Code Alignment Factor
76 .sleb128 2      // CIE Data Alignment Factor
77 .initByte 0xc   // CIE RA Column
78 .initByte 0xc   // DW_CFA_def_cfa
79 .uleb128 0xd
80 .uleb128 0x0
81 .align 2
82 _picoMark_CieEnd=
83
84 // FDE 
85 _picoMark_LSFDE0I900821033007563=
86 .unalignedInitLong _picoMark_FdeEnd-_picoMark_FdeBegin
87 _picoMark_FdeBegin=
88 .unalignedInitLong _picoMark_DebugFrame // FDE CIE offset
89 .unalignedInitWord _picoMark_FUNCTION_BEGIN     // FDE initial location
90 .unalignedInitWord _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
91 .initByte 0xe   // DW_CFA_def_cfa_offset
92 .uleb128 0x0    // <-- FUNCTION_STACK_SIZE_GOES_HERE
93 .initByte 0x4   // DW_CFA_advance_loc4
94 .unalignedInitLong _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
95 .initByte 0xe   // DW_CFA_def_cfa_offset
96 .uleb128 0x0
97 .align 2
98 _picoMark_FdeEnd=
99
100 //============================================================================
101 // Abbrevation information.
102 //============================================================================
103
104 .section .debug_abbrev
105 _picoMark_ABBREVIATIONS=
106
107 .section .debug_abbrev
108         .uleb128 0x1    // (abbrev code)
109         .uleb128 0x11   // (TAG: DW_TAG_compile_unit)
110         .initByte 0x1   // DW_children_yes
111         .uleb128 0x10   // (DW_AT_stmt_list)
112         .uleb128 0x6    // (DW_FORM_data4)
113         .uleb128 0x12   // (DW_AT_high_pc)
114         .uleb128 0x1    // (DW_FORM_addr)
115         .uleb128 0x11   // (DW_AT_low_pc)
116         .uleb128 0x1    // (DW_FORM_addr)
117         .uleb128 0x25   // (DW_AT_producer)
118         .uleb128 0x8    // (DW_FORM_string)
119         .uleb128 0x13   // (DW_AT_language)
120         .uleb128 0x5    // (DW_FORM_data2)
121         .uleb128 0x3    // (DW_AT_name)
122         .uleb128 0x8    // (DW_FORM_string)
123 .initByte 0x0
124 .initByte 0x0
125
126         .uleb128 0x2    ;# (abbrev code)
127         .uleb128 0x2e   ;# (TAG: DW_TAG_subprogram)
128 .initByte 0x0   ;# DW_children_no
129         .uleb128 0x3    ;# (DW_AT_name)
130         .uleb128 0x8    ;# (DW_FORM_string)
131         .uleb128 0x11   ;# (DW_AT_low_pc)
132         .uleb128 0x1    ;# (DW_FORM_addr)
133         .uleb128 0x12   ;# (DW_AT_high_pc)
134         .uleb128 0x1    ;# (DW_FORM_addr)
135 .initByte 0x0
136 .initByte 0x0
137
138 .initByte 0x0
139
140 //============================================================================
141 // Line information. DwarfLib requires this to be present, but it can
142 // be empty.
143 //============================================================================
144
145 .section .debug_line
146 _picoMark_LINES=
147
148 //============================================================================
149 // Debug Information
150 //============================================================================
151 .section .debug_info
152
153 //Fixed header.
154 .unalignedInitLong _picoMark_DEBUG_INFO_END-_picoMark_DEBUG_INFO_BEGIN
155 _picoMark_DEBUG_INFO_BEGIN=
156 .unalignedInitWord 0x2
157 .unalignedInitLong _picoMark_ABBREVIATIONS
158 .initByte 0x2
159
160 // Compile unit information.
161 .uleb128 0x1    // (DIE 0xb) DW_TAG_compile_unit)
162 .unalignedInitLong _picoMark_LINES
163 .unalignedInitWord _picoMark_FUNCTION_END
164 .unalignedInitWord _picoMark_FUNCTION_BEGIN
165 // Producer is `picoChip'
166 .ascii 16#70# 16#69# 16#63# 16#6f# 16#43# 16#68# 16#69# 16#70# 16#00#
167 .unalignedInitWord 0xcafe // ASM language
168 .ascii 16#0# // Name. DwarfLib expects this to be present.
169
170 .uleb128 0x2    ;# (DIE DW_TAG_subprogram)
171
172 // FUNCTION NAME GOES HERE. Use `echo name | od -t x1' to get the hex. Each hex
173 // digit is specified using the format 16#XX#
174 .ascii 16#6c# 16#6f# 16#6e# 16#67# 16#6a# 16#6d# 16#70# 16#0# // Function name `longjmp'
175 .unalignedInitWord _picoMark_FUNCTION_BEGIN     // DW_AT_low_pc
176 .unalignedInitWord _picoMark_FUNCTION_END       // DW_AT_high_pc
177
178 .initByte 0x0   // end of compile unit children.
179
180 _picoMark_DEBUG_INFO_END=
181
182 //============================================================================
183 // END OF DWARF
184 //============================================================================
185
186 .section .endFile
187 // End of picoChip ASM file