Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/m68k/fpsp Make this new-GAS ready. Code by Steve Wo...
details: https://anonhg.NetBSD.org/src/rev/1a14e7a5eaef
branches: trunk
changeset: 500147:1a14e7a5eaef
user: is <is%NetBSD.org@localhost>
date: Wed Dec 06 21:31:05 2000 +0000
description:
Make this new-GAS ready. Code by Steve Woodford.
diffstat:
sys/arch/m68k/fpsp/asm2gas | 94 +++++++++++++++++++++++++++++++++++++++------
1 files changed, 80 insertions(+), 14 deletions(-)
diffs (123 lines):
diff -r 844d90afd8b7 -r 1a14e7a5eaef sys/arch/m68k/fpsp/asm2gas
--- a/sys/arch/m68k/fpsp/asm2gas Wed Dec 06 21:26:07 2000 +0000
+++ b/sys/arch/m68k/fpsp/asm2gas Wed Dec 06 21:31:05 2000 +0000
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: asm2gas,v 1.5 1998/08/15 03:51:31 mycroft Exp $
+# $NetBSD: asm2gas,v 1.6 2000/12/06 21:31:05 is Exp $
#
# Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -138,33 +138,99 @@
' | sed -e '
# operand conversion
- s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
- s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1FPI\2/g
- s/\([^_a-zA-Z0-9]\)FPIAR$/\1FPI/g
- s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
- s/\([^_a-zA-Z0-9]\)fpiar\([^_a-zA-Z0-9]\)/\1fpi\2/g
- s/\([^_a-zA-Z0-9]\)fpiar$/\1fpi/g
+ s/\([^_a-zA-Z0-9]\)FPIAR\([^_a-zA-Z0-9]\)/\1%FPI\2/g
+ s/\([^_a-zA-Z0-9]\)FPIAR$/\1%FPI/g
+ s/\([^_a-zA-Z0-9]\)fpiar\([^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PcC0-7]\))+/\1@+/g
+ s/\([-+A-Za-z0-9_]*\)(\(%[sSpPaA][pPcC0-7]\)\([),]\)/\2@(\1\3/g
s/\.\([bBwWlL])\)/:\1/g
s/\.\([bBwWlL]\)\*\([0-9][0-9]*)\)/:\1:\2/g
s/\*\([0-9][0-9]*\))/:l:\1)/g
s/{\([0-9][0-9]*\):\([0-9][0-9]*\)}/{#\1:#\2}/g
- s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
+ s/{\(%[dD][0-7]\):\([0-9][0-9]*\)}/{\1:#\2}/g
+ s/{\([dD][0-7]\):\([0-9][0-9]*\)}/{%\1:#\2}/g
+ s/{\([dD][0-7]\):\(%[dD][0-9]*\)}/{%\1:\2}/g
+
+ s/\(-\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
+ s/\(-\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
+
+ s/\(\/\)\([dDaA][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
+ s/\(\/\)\([fF][pP][0-7]\)\([^_a-zA-Z0-9]\)/\1%\2\3/g
s/@(0*)/@/g
s/(,/(/g;s/:)/)/g
# make up for a gas bug
/^ fmovemx /{
- s/ \([fF][pP][0-7]\),/ \1-\1,/
- s/,\([fF][pP][0-7]\) /,\1-\1 /
- s/,\([fF][pP][0-7]\)$/,\1-\1/
+ s/ \(%[fF][pP][0-7]\),/ \1-\1,/
+ s/,\(%[fF][pP][0-7]\) /,\1-\1 /
+ s/,\(%[fF][pP][0-7]\)$/,\1-\1/
}
+' | sed -e '
+ # Floating point literal conversion
+
+ s/:0x41dfffffffc00000/0r2147483647.0/g
+ s/:0xc1e0000000000000/0r-2147483648.0/g
+ s/:0x41dfffffffe00000/0r2147483647.5/g
+ s/:0xc1e0000000100000/0r-2147483648.5/g
+ s/:0x46fffe00/0r32767.0/g
+ s/:0xc7000000/0r-32768.0/g
+ s/:0x46ffff00/0r32767.5/g
+ s/:0xc7000080/0r-32768.5/g
+ s/:0x42fe0000/0r127.0/g
+ s/:0xc3000000/0r-128.0/g
+ s/:0x42ff0000/0r127.5/g
+ s/:0xc3008000/0r-128.5/g
+ s/:0x3F800000/0r1.0/g
+ s/:0x00000000/0r0.0/g
+ s/:0xBF800000/0r-1.0/g
+ s/:0x3F000000/0r0.5/g
+ s/:0x3E800000/0r0.25/g
+ s/:0x42B8AA3B/0r92.332481384277343750/g
+ s/:0xBC317218/0r-0.0108304247260093688964843750/g
+ s/:0x3AB60B70/0r0.001388890668749809265136718750/g
+ s/:0x3C088895/0r0.0083333449438214302062988281250/g
+ s/:0x42B8AA3B/0r92.332481384277343750/g
+ s/:0x3950097B/0r0.0001983995753107592463493347167968750/g
+ s/:0x3AB60B6A/0r0.001388889970257878303527832031250/g
+ s/:0x2F30CAA8/0r1.60791047143504783889511600136756896972656250e-10/g
+ s/:0x310F8290/0r2.0883454965314740547910332679748535156250e-09/g
+ s/:0x32D73220/0r2.5052088403754169121384620666503906250e-08/g
+ s/:0x3493F281/0r2.755732850800995947793126106262207031250e-07/g
+ s/:0x40000000/0r2.0/g
+ s/:0x42800000/0r6.40e+01/g
+ s/:0x3C800000/0r1.56250e-02/g
+ s/fadds #:0x00800000,%[fF][pP]0/ .long 0xf23c4422,0x00800000/
+ s/fsubs #:0x00800000,%[fF][pP]0/ .long 0xf23c4428,0x00800000/
+ s/fsubs #:0x00800000,%[fF][pP]1/ .long 0xf23c44a8,0x00800000/
+ s/fmoves #:0x80000000,%[fF][pP]0/ .long 0xf23c4400,0x80000000/
+ s/fmoves #:0x00000000,%[fF][pP]0/ .long 0xf23c4400,0x00000000/
+
'
Home |
Main Index |
Thread Index |
Old Index