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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [libgcc/] [config/] [picochip/] [ashrsi3.S] - Blame information for rev 737

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

Line No. Rev Author Line
1 734 jeremybenn
// picoChip ASM file
2
//
3
//   Support for 32-bit arithmetic shift right.
4
//
5
//   Copyright (C) 2003, 2004, 2005, 2008, 2009  Free Software Foundation, Inc.
6
//   Contributed by Picochip 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
.global ___ashrsi3
31
___ashrsi3:
32
_picoMark_FUNCTION_BEGIN=
33
 
34
// picoChip Function Prologue : &___ashrsi3 = 0 bytes
35
 
36
        // if (R2 > 15) goto _L2
37
        SUB.0 15,R2,r15
38
        JMPLT _L2
39
=->     COPY.0 R1,R3
40
 
41
        LSR.0 R1,R2,R1 // R1 := R1 >> R2
42
        // if (R2 == 0) goto _L4
43
        SUB.0 R2,0,r15
44
        JMPEQ _L4
45
=->     LSR.0 R0,R2,R0 // R2 := R0 >> R2
46
 
47
        SUB.0 16,R2,R4 // R4 := R4 - R2 (HI)
48
        ASR.0 R3,15,R5  // R5 = R1 >>{arith} 15
49
        LSL.0 R5,R4,R5 // R5 := R5 << R4
50
        LSL.0 R3,R4,R4 // R4 := R1 << R4
51
        OR.0 R5,R1,R1 // R3 := R5 IOR R3 (HI)
52
        BRA _L4
53
        =->     OR.0 R4,R0,R0 // R2 := R4 IOR R0 (HI)
54
_L2:
55
        ASR.0 R1,15,R1  // R4 = R1 >>{arith} 15
56
        SUB.0 16,R2,R5  // R5 := R5 - R2 (HI)
57
        LSR.0 R3,R2,R0 // R2 := R1 >> R2
58
        LSL.0 R1,R5,R5 // R5 := R4 << R5
59
        OR.0 R5,R0,R5 // R2 := R5 IOR R2 (HI)
60
        SUB.0 R2,16,r15  // R5 := R5 - R2 (HI)
61
        COPYNE R5,R0
62
_L4:
63
        JR (R12)        // Return to caller
64
 
65
_picoMark_FUNCTION_END=
66
 
67
// picoChip Function Epilogue : __ashrsi3
68
//============================================================================
69
// All DWARF information between this marker, and the END OF DWARF
70
// marker should be included in the source file. Search for
71
// FUNCTION_STACK_SIZE_GOES_HERE and FUNCTION NAME GOES HERE, and
72
// provide the relevent information. Add markers called
73
// _picoMark_FUNCTION_BEGIN and _picoMark_FUNCTION_END around the
74
// function in question.
75
//============================================================================
76
 
77
//============================================================================
78
// Frame information.
79
//============================================================================
80
 
81
.section .debug_frame
82
_picoMark_DebugFrame=
83
 
84
// Common CIE header.
85
.unalignedInitLong _picoMark_CieEnd-_picoMark_CieBegin
86
_picoMark_CieBegin=
87
.unalignedInitLong 0xffffffff
88
.initByte 0x1   // CIE Version
89
.ascii 16#0#    // CIE Augmentation
90
.uleb128 0x1    // CIE Code Alignment Factor
91
.sleb128 2      // CIE Data Alignment Factor
92
.initByte 0xc   // CIE RA Column
93
.initByte 0xc   // DW_CFA_def_cfa
94
.uleb128 0xd
95
.uleb128 0x0
96
.align 2
97
_picoMark_CieEnd=
98
 
99
// FDE
100
_picoMark_LSFDE0I900821033007563=
101
.unalignedInitLong _picoMark_FdeEnd-_picoMark_FdeBegin
102
_picoMark_FdeBegin=
103
.unalignedInitLong _picoMark_DebugFrame // FDE CIE offset
104
.unalignedInitWord _picoMark_FUNCTION_BEGIN     // FDE initial location
105
.unalignedInitWord _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
106
.initByte 0xe   // DW_CFA_def_cfa_offset
107
.uleb128 0x0    // <-- FUNCTION_STACK_SIZE_GOES_HERE
108
.initByte 0x4   // DW_CFA_advance_loc4
109
.unalignedInitLong _picoMark_FUNCTION_END-_picoMark_FUNCTION_BEGIN
110
.initByte 0xe   // DW_CFA_def_cfa_offset
111
.uleb128 0x0
112
.align 2
113
_picoMark_FdeEnd=
114
 
115
//============================================================================
116
// Abbrevation information.
117
//============================================================================
118
 
119
.section .debug_abbrev
120
_picoMark_ABBREVIATIONS=
121
 
122
.section .debug_abbrev
123
        .uleb128 0x1    // (abbrev code)
124
        .uleb128 0x11   // (TAG: DW_TAG_compile_unit)
125
        .initByte 0x1   // DW_children_yes
126
        .uleb128 0x10   // (DW_AT_stmt_list)
127
        .uleb128 0x6    // (DW_FORM_data4)
128
        .uleb128 0x12   // (DW_AT_high_pc)
129
        .uleb128 0x1    // (DW_FORM_addr)
130
        .uleb128 0x11   // (DW_AT_low_pc)
131
        .uleb128 0x1    // (DW_FORM_addr)
132
        .uleb128 0x25   // (DW_AT_producer)
133
        .uleb128 0x8    // (DW_FORM_string)
134
        .uleb128 0x13   // (DW_AT_language)
135
        .uleb128 0x5    // (DW_FORM_data2)
136
        .uleb128 0x3    // (DW_AT_name)
137
        .uleb128 0x8    // (DW_FORM_string)
138
.initByte 0x0
139
.initByte 0x0
140
 
141
        .uleb128 0x2    ;# (abbrev code)
142
        .uleb128 0x2e   ;# (TAG: DW_TAG_subprogram)
143
.initByte 0x0   ;# DW_children_no
144
        .uleb128 0x3    ;# (DW_AT_name)
145
        .uleb128 0x8    ;# (DW_FORM_string)
146
        .uleb128 0x11   ;# (DW_AT_low_pc)
147
        .uleb128 0x1    ;# (DW_FORM_addr)
148
        .uleb128 0x12   ;# (DW_AT_high_pc)
149
        .uleb128 0x1    ;# (DW_FORM_addr)
150
.initByte 0x0
151
.initByte 0x0
152
 
153
.initByte 0x0
154
 
155
//============================================================================
156
// Line information. DwarfLib requires this to be present, but it can
157
// be empty.
158
//============================================================================
159
 
160
.section .debug_line
161
_picoMark_LINES=
162
 
163
//============================================================================
164
// Debug Information
165
//============================================================================
166
.section .debug_info
167
 
168
//Fixed header.
169
.unalignedInitLong _picoMark_DEBUG_INFO_END-_picoMark_DEBUG_INFO_BEGIN
170
_picoMark_DEBUG_INFO_BEGIN=
171
.unalignedInitWord 0x2
172
.unalignedInitLong _picoMark_ABBREVIATIONS
173
.initByte 0x2
174
 
175
// Compile unit information.
176
.uleb128 0x1    // (DIE 0xb) DW_TAG_compile_unit)
177
.unalignedInitLong _picoMark_LINES
178
.unalignedInitWord _picoMark_FUNCTION_END
179
.unalignedInitWord _picoMark_FUNCTION_BEGIN
180
// Producer is `picoChip'
181
.ascii 16#70# 16#69# 16#63# 16#6f# 16#43# 16#68# 16#69# 16#70# 16#00#
182
.unalignedInitWord 0xcafe // ASM language
183
.ascii 16#0# // Name. DwarfLib expects this to be present.
184
 
185
.uleb128 0x2    ;# (DIE DW_TAG_subprogram)
186
 
187
// FUNCTION NAME GOES HERE. Use `echo name | od -t x1' to get the hex. Each hex
188
// digit is specified using the format 16#XX#
189
.ascii 16#5f# 16#61# 16#73# 16#68# 16#72# 16#73# 16#69# 16#33# 16#0# // Function name `_ashrsi3'
190
.unalignedInitWord _picoMark_FUNCTION_BEGIN     // DW_AT_low_pc
191
.unalignedInitWord _picoMark_FUNCTION_END       // DW_AT_high_pc
192
 
193
.initByte 0x0   // end of compile unit children.
194
 
195
_picoMark_DEBUG_INFO_END=
196
 
197
//============================================================================
198
// END OF DWARF
199
//============================================================================
200
 
201
.section .endFile
202
// End of picoChip ASM file

powered by: WebSVN 2.1.0

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