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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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