Commit 6b148bd9 by Kazu Hirata Committed by Kazu Hirata

crti.asm: Remove trailing spaces.

	* config/h8300/crti.asm: Remove trailing spaces.
	* config/h8300/h8300.c: Likewise.
	* config/h8300/lib1funcs.asm: Likewise.

From-SVN: r53090
parent 609688f3
2002-05-03 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/crti.asm: Remove trailing spaces.
* config/h8300/h8300.c: Likewise.
* config/h8300/lib1funcs.asm: Likewise.
2002-05-02 Jason Merrill <jason@redhat.com> 2002-05-02 Jason Merrill <jason@redhat.com>
* defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c. * defaults.h (BOOL_TYPE_SIZE): Move default here from cp/decl.c.
......
/* Copyright (C) 2001 Free Software Foundation, Inc. /* Copyright (C) 2001, 2002 Free Software Foundation, Inc.
This file is part of GNU CC. This file is part of GNU CC.
...@@ -50,4 +50,4 @@ Boston, MA 02111-1307, USA. */ ...@@ -50,4 +50,4 @@ Boston, MA 02111-1307, USA. */
__init: __init:
.section .fini .section .fini
.global __fini .global __fini
__fini: __fini:
...@@ -2958,7 +2958,7 @@ compute_a_shift_length (insn, operands) ...@@ -2958,7 +2958,7 @@ compute_a_shift_length (insn, operands)
} }
wlength += h8300_asm_insn_count (info.shift1) * n; wlength += h8300_asm_insn_count (info.shift1) * n;
return 2 * wlength; return 2 * wlength;
case SHIFT_ROT_AND: case SHIFT_ROT_AND:
...@@ -2977,7 +2977,7 @@ compute_a_shift_length (insn, operands) ...@@ -2977,7 +2977,7 @@ compute_a_shift_length (insn, operands)
} }
wlength += h8300_asm_insn_count (info.shift1) * m; wlength += h8300_asm_insn_count (info.shift1) * m;
/* Now mask off the high bits. */ /* Now mask off the high bits. */
switch (mode) switch (mode)
{ {
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
;; Contributed by Steve Chamberlain <sac@cygnus.com> ;; Contributed by Steve Chamberlain <sac@cygnus.com>
;; Optimizations by Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com> ;; Optimizations by Toshiyasu Morita <toshiyasu.morita@hsa.hitachi.com>
/* Copyright (C) 1994, 2000, 2001 Free Software Foundation, Inc. /* Copyright (C) 1994, 2000, 2001, 2002 Free Software Foundation, Inc.
This file is free software; you can redistribute it and/or modify it This file is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the under the terms of the GNU General Public License as published by the
...@@ -162,7 +162,7 @@ ___ucmpsi2: ...@@ -162,7 +162,7 @@ ___ucmpsi2:
;; "supporting routines". ;; "supporting routines".
; general purpose normalize routine ; general purpose normalize routine
; ;
; divisor in A0 ; divisor in A0
; dividend in A1 ; dividend in A1
; turns both into +ve numbers, and leaves what the answer sign ; turns both into +ve numbers, and leaves what the answer sign
...@@ -174,13 +174,13 @@ ___ucmpsi2: ...@@ -174,13 +174,13 @@ ___ucmpsi2:
divnorm: divnorm:
mov.b #0x0,A2L mov.b #0x0,A2L
or A0H,A0H ; is divisor > 0 or A0H,A0H ; is divisor > 0
bge _lab1 bge _lab1
not A0H ; no - then make it +ve not A0H ; no - then make it +ve
not A0L not A0L
adds #1,A0 adds #1,A0
xor #0x1,A2L ; and remember that in A2L xor #0x1,A2L ; and remember that in A2L
_lab1: or A1H,A1H ; look at dividend _lab1: or A1H,A1H ; look at dividend
bge _lab2 bge _lab2
not A1H ; it is -ve, make it positive not A1H ; it is -ve, make it positive
not A1L not A1L
adds #1,A1 adds #1,A1
...@@ -191,13 +191,13 @@ _lab2: rts ...@@ -191,13 +191,13 @@ _lab2: rts
modnorm: modnorm:
mov.b #0x0,A2L mov.b #0x0,A2L
or A0H,A0H ; is divisor > 0 or A0H,A0H ; is divisor > 0
bge _lab7 bge _lab7
not A0H ; no - then make it +ve not A0H ; no - then make it +ve
not A0L not A0L
adds #1,A0 adds #1,A0
xor #0x1,A2L ; and remember that in A2L xor #0x1,A2L ; and remember that in A2L
_lab7: or A1H,A1H ; look at dividend _lab7: or A1H,A1H ; look at dividend
bge _lab8 bge _lab8
not A1H ; it is -ve, make it positive not A1H ; it is -ve, make it positive
not A1L not A1L
adds #1,A1 adds #1,A1
...@@ -214,7 +214,7 @@ negans: or A2L,A2L ; should answer be negative ? ...@@ -214,7 +214,7 @@ negans: or A2L,A2L ; should answer be negative ?
not A0H ; yes, so make it so not A0H ; yes, so make it so
not A0L not A0L
adds #1,A0 adds #1,A0
_lab4: rts _lab4: rts
; A0=A0%A1 signed ; A0=A0%A1 signed
...@@ -251,13 +251,13 @@ ___umodhi3: ...@@ -251,13 +251,13 @@ ___umodhi3:
.global ___udivhi3 .global ___udivhi3
___udivhi3: ___udivhi3:
; A0 A1 A2 A3 ; A0 A1 A2 A3
; Nn Dd P ; Nn Dd P
sub.w A3,A3 ; Nn Dd xP 00 sub.w A3,A3 ; Nn Dd xP 00
or A1H,A1H or A1H,A1H
bne divlongway bne divlongway
or A0H,A0H or A0H,A0H
beq _lab6 beq _lab6
; we know that D == 0 and N is != 0 ; we know that D == 0 and N is != 0
mov.b A0H,A3L ; Nn Dd xP 0N mov.b A0H,A3L ; Nn Dd xP 0N
...@@ -269,7 +269,7 @@ _lab6: mov.b A0L,A3L ; n ...@@ -269,7 +269,7 @@ _lab6: mov.b A0L,A3L ; n
mov.b A3L,A0L ; Qq mov.b A3L,A0L ; Qq
mov.b A3H,A3L ; m mov.b A3H,A3L ; m
mov.b #0x0,A3H ; Qq 0m mov.b #0x0,A3H ; Qq 0m
rts rts
; D != 0 - which means the denominator is ; D != 0 - which means the denominator is
; loop around to get the result. ; loop around to get the result.
...@@ -280,19 +280,19 @@ divlongway: ...@@ -280,19 +280,19 @@ divlongway:
mov.b #0x8,A2H ; 8 mov.b #0x8,A2H ; 8
div8: add.b A0L,A0L ; n*=2 div8: add.b A0L,A0L ; n*=2
rotxl A3L ; Make remainder bigger rotxl A3L ; Make remainder bigger
rotxl A3H rotxl A3H
sub.w A1,A3 ; Q-=N sub.w A1,A3 ; Q-=N
bhs setbit ; set a bit ? bhs setbit ; set a bit ?
add.w A1,A3 ; no : too far , Q+=N add.w A1,A3 ; no : too far , Q+=N
dec A2H dec A2H
bne div8 ; next bit bne div8 ; next bit
rts rts
setbit: inc A0L ; do insert bit setbit: inc A0L ; do insert bit
dec A2H dec A2H
bne div8 ; next bit bne div8 ; next bit
rts rts
#endif /* __H8300__ */ #endif /* __H8300__ */
#endif /* L_divhi3 */ #endif /* L_divhi3 */
...@@ -301,7 +301,7 @@ setbit: inc A0L ; do insert bit ...@@ -301,7 +301,7 @@ setbit: inc A0L ; do insert bit
;; 4 byte integer divides for the H8/300. ;; 4 byte integer divides for the H8/300.
;; ;;
;; We have one routine which does all the work and lots of ;; We have one routine which does all the work and lots of
;; little ones which prepare the args and massage the sign. ;; little ones which prepare the args and massage the sign.
;; We bunch all of this into one object file since there are several ;; We bunch all of this into one object file since there are several
;; "supporting routines". ;; "supporting routines".
...@@ -334,11 +334,11 @@ divnorm: ...@@ -334,11 +334,11 @@ divnorm:
postive: postive:
mov.b A2H,A2H ; is the denominator -ve mov.b A2H,A2H ; is the denominator -ve
bge postive2 bge postive2
not A2L not A2L
not A2H not A2H
not A3L not A3L
not A3H not A3H
add.b #1,A3L add.b #1,A3L
addx #0,A3H addx #0,A3H
addx #0,A2L addx #0,A2L
addx #0,A2H addx #0,A2H
...@@ -368,11 +368,11 @@ modnorm: ...@@ -368,11 +368,11 @@ modnorm:
mpostive: mpostive:
mov.b A2H,A2H ; is the denominator -ve mov.b A2H,A2H ; is the denominator -ve
bge mpostive2 bge mpostive2
not A2L not A2L
not A2H not A2H
not A3L not A3L
not A3H not A3H
add.b #1,A3L add.b #1,A3L
addx #0,A3H addx #0,A3H
addx #0,A2L addx #0,A2L
addx #0,A2H addx #0,A2H
...@@ -424,7 +424,7 @@ mpostive2: ...@@ -424,7 +424,7 @@ mpostive2:
; denominator in A2/A3 ; denominator in A2/A3
.global ___modsi3 .global ___modsi3
___modsi3: ___modsi3:
PUSHP S2P PUSHP S2P
PUSHP S0P PUSHP S0P
PUSHP S1P PUSHP S1P
...@@ -461,7 +461,7 @@ ___umodsi3: ...@@ -461,7 +461,7 @@ ___umodsi3:
mov.l S0P,A0P mov.l S0P,A0P
#endif #endif
bra exitdiv bra exitdiv
.global ___divsi3 .global ___divsi3
___divsi3: ___divsi3:
PUSHP S2P PUSHP S2P
...@@ -477,7 +477,7 @@ exitdiv: ...@@ -477,7 +477,7 @@ exitdiv:
or S2L,S2L or S2L,S2L
beq reti beq reti
; should be -ve ; should be -ve
#ifdef __H8300__ #ifdef __H8300__
not A0H not A0H
...@@ -495,7 +495,7 @@ exitdiv: ...@@ -495,7 +495,7 @@ exitdiv:
reti: reti:
POPP S2P POPP S2P
rts rts
; takes A0/A1 numerator (A0P for 300H) ; takes A0/A1 numerator (A0P for 300H)
; A2/A3 denominator (A1P for 300H) ; A2/A3 denominator (A1P for 300H)
...@@ -538,7 +538,7 @@ NumByte3Zero: ...@@ -538,7 +538,7 @@ NumByte3Zero:
mov.b S1H,S1L mov.b S1H,S1L
mov.b #0x0,S1H mov.b #0x0,S1H
rts rts
; have to do the divide by shift and test ; have to do the divide by shift and test
DenHighZero: DenHighZero:
...@@ -562,7 +562,7 @@ nextbit: ...@@ -562,7 +562,7 @@ nextbit:
sub.w A3,S1 ; does it all fit sub.w A3,S1 ; does it all fit
subx A2L,S0L subx A2L,S0L
subx A2H,S0H subx A2H,S0H
bhs setone bhs setone
add.w A3,S1 ; no, restore mistake add.w A3,S1 ; no, restore mistake
addx A2L,S0L addx A2L,S0L
...@@ -570,13 +570,13 @@ nextbit: ...@@ -570,13 +570,13 @@ nextbit:
dec S2H dec S2H
bne nextbit bne nextbit
rts rts
setone: setone:
inc A1L inc A1L
dec S2H dec S2H
bne nextbit bne nextbit
rts rts
#else /* __H8300H__ */ #else /* __H8300H__ */
...@@ -631,11 +631,11 @@ setone: ...@@ -631,11 +631,11 @@ setone:
;; HImode multiply. ;; HImode multiply.
; The H8/300 only has an 8*8->16 multiply. ; The H8/300 only has an 8*8->16 multiply.
; The answer is the same as: ; The answer is the same as:
; ;
; product = (srca.l * srcb.l) + ((srca.h * srcb.l) + (srcb.h * srca.l)) * 256 ; product = (srca.l * srcb.l) + ((srca.h * srcb.l) + (srcb.h * srca.l)) * 256
; (we can ignore A1.h * A0.h cause that will all off the top) ; (we can ignore A1.h * A0.h cause that will all off the top)
; A0 in ; A0 in
; A1 in ; A1 in
; A0 answer ; A0 answer
#ifdef __H8300__ #ifdef __H8300__
...@@ -644,7 +644,7 @@ setone: ...@@ -644,7 +644,7 @@ setone:
.global ___mulhi3 .global ___mulhi3
___mulhi3: ___mulhi3:
mov.b A1L,A2L ; A2l gets srcb.l mov.b A1L,A2L ; A2l gets srcb.l
mulxu A0L,A2 ; A2 gets first sub product mulxu A0L,A2 ; A2 gets first sub product
mov.b A0H,A3L ; prepare for mov.b A0H,A3L ; prepare for
mulxu A1L,A3 ; second sub product mulxu A1L,A3 ; second sub product
...@@ -652,7 +652,7 @@ ___mulhi3: ...@@ -652,7 +652,7 @@ ___mulhi3:
add.b A3L,A2H ; sum first two terms add.b A3L,A2H ; sum first two terms
mov.b A1H,A3L ; third sub product mov.b A1H,A3L ; third sub product
mulxu A0L,A3 mulxu A0L,A3
add.b A3L,A2H ; almost there add.b A3L,A2H ; almost there
mov.w A2,A0 ; that is mov.w A2,A0 ; that is
...@@ -664,7 +664,7 @@ ___mulhi3: ...@@ -664,7 +664,7 @@ ___mulhi3:
#ifdef L_mulsi3 #ifdef L_mulsi3
;; SImode multiply. ;; SImode multiply.
;; ;;
;; I think that shift and add may be sufficient for this. Using the ;; I think that shift and add may be sufficient for this. Using the
;; supplied 8x8->16 would need 10 ops of 14 cycles each + overhead. This way ;; supplied 8x8->16 would need 10 ops of 14 cycles each + overhead. This way
;; the inner loop uses maybe 20 cycles + overhead, but terminates ;; the inner loop uses maybe 20 cycles + overhead, but terminates
...@@ -673,7 +673,7 @@ ___mulhi3: ...@@ -673,7 +673,7 @@ ___mulhi3:
;; A0/A1 src_a ;; A0/A1 src_a
;; A2/A3 src_b ;; A2/A3 src_b
;; ;;
;; while (a) ;; while (a)
;; { ;; {
;; if (a & 1) ;; if (a & 1)
;; r += b; ;; r += b;
...@@ -691,10 +691,10 @@ ___mulsi3: ...@@ -691,10 +691,10 @@ ___mulsi3:
PUSHP S0P PUSHP S0P
PUSHP S1P PUSHP S1P
PUSHP S2P PUSHP S2P
sub.w S0,S0 sub.w S0,S0
sub.w S1,S1 sub.w S1,S1
; while (a) ; while (a)
_top: mov.w A0,A0 _top: mov.w A0,A0
bne _more bne _more
...@@ -713,7 +713,7 @@ _nobit: ...@@ -713,7 +713,7 @@ _nobit:
rotxr A0L rotxr A0L
rotxr A1H rotxr A1H
rotxr A1L rotxr A1L
; b <<= 1 ; b <<= 1
add.w A3,A3 add.w A3,A3
addx A2L,A2L addx A2L,A2L
...@@ -721,7 +721,7 @@ _nobit: ...@@ -721,7 +721,7 @@ _nobit:
bra _top bra _top
_done: _done:
mov.w S0,A0 mov.w S0,A0
mov.w S1,A1 mov.w S1,A1
POPP S2P POPP S2P
POPP S1P POPP S1P
...@@ -751,7 +751,7 @@ _done: ...@@ -751,7 +751,7 @@ _done:
___mulsi3: ___mulsi3:
mov.w r1,r2 ; ( 2 states) b * d mov.w r1,r2 ; ( 2 states) b * d
mulxu r0,er2 ; (22 states) mulxu r0,er2 ; (22 states)
mov.w e0,r3 ; ( 2 states) a * d mov.w e0,r3 ; ( 2 states) a * d
beq L_skip1 ; ( 4 states) beq L_skip1 ; ( 4 states)
mulxu r1,er3 ; (22 states) mulxu r1,er3 ; (22 states)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment