Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
0ea1f6b6
Commit
0ea1f6b6
authored
Jul 30, 2000
by
Michael Hayes
Committed by
Michael Hayes
Jul 30, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* config/c4x/libgcc.S: (divqf3): Improve accuracy.
From-SVN: r35335
parent
00c9e663
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
10 deletions
+19
-10
gcc/ChangeLog
+4
-0
gcc/config/c4x/libgcc.S
+15
-10
No files found.
gcc/ChangeLog
View file @
0ea1f6b6
2000-07-30 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/libgcc.S: (divqf3): Improve accuracy.
2000-07-27 Mark Mitchell <mark@codesourcery.com>
Put phi nodes after NOTE_INSN_BASIC_BLOCK.
...
...
gcc/config/c4x/libgcc.S
View file @
0ea1f6b6
...
...
@@ -133,24 +133,29 @@ ___divqf3:
mpyf r1, r0 ; r0 = r[2] * (2.0 - r[2] * v) = r[3]
; End of 3rd iteration
or 080h, r0 ; add 1 lsb to result. needed when complemeting
; 1.0 / 2.0
rnd r0
rnd r0 ; Minimize error in x[3]'s LSBs
; Use modified last iteration
; r[4] = (r[3] * (1.0 - (v * r[3]))) + r[3]
mpyf3 r0, r3, r1 ; r1 = r[3] * v
subrf 1.0, r1 ; r1 = 1.0 - r[3] * v
mpyf r0, r1 ; r1 = r[3] * (1.0 - r[3] * v)
addf r1, r0 ; r0 = r[3] * (1.0 - r[3] * v) + r[3] = r[4]
rnd r0 ; Minimize error in x[4]'s LSBs
bud ar1 ; Delayed branch
addf r1, r0 ; r0 = r[3] * (1.0 - r[3] * v) + r[3] = r[4]
.if .REGPARM == 0
mpyf *-ar0(1), r0 ; Multiply by the dividend
.else
mpyf r2, r0 ; Multiply by the dividend
.endif
rnd r0
.if .REGPARM == 0
ldfu *-ar0(1), r2 ; Dividend in mem has only 24 bits significance
.else
rnd r2 ; Minimize error in reg dividend's LSBs
; since this may have 32 bit significance
.endif
mpyf r2, r0 ; Multiply by the dividend
rnd r0 ; Round result to 32 bits
; Branch occurs here
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment