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