This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Incorrect assembler code generated for target h8300-hitachi-coff
- To: bug-gcc at prep dot ai dot mit dot edu, egcs-bugs at cygnus dot com
- Subject: Incorrect assembler code generated for target h8300-hitachi-coff
- From: Stefan dot Becker at nmp dot nokia dot com
- Date: Mon, 27 Jul 98 10:44:10 +0200
Hi!
I'm trying to compile gcc 2.8.1/egcs 1.0.3a as a cross-compiler for the
target h8300-hitachi-coff on the host platform hppa1.1-hp-hpux10.20.
While compiling the C library package "newlib" the compiler generates
incorrect assembler code which causes gas to fail. The faulty lines look
like this:
mov.b r4l,r4hn mov.b r5h,r4l
^ This looks like a \n without the \!
When I replace the "n" with "\n" the code assembles just fine. I have
been trying to identify the place in the code where "n" is generated
errorneously instead of "\n" but I couldn't find it (insn_output.c looks
OK to me...). The machine configuration for h8300 is slightely different
for gcc/egcs but updating the gcc to the egcs one didn't fix the problem,
because BOTH compilers fail at the same place.
I'll attach one example file from newlib-1.8.1 which fails to compile but
there are more of them.
Configuration:
../src/configure --prefix=/appl/hpux10/gcc
--with-gnu-as --with-gnu-ld --with-newlib
--target=h8300-hitachi-coff
Compilation:
gmake CFLAGS=-O2 CXXFLAGS=-O2 LANGUAGES="c c++" (cross for egcs)
Version information:
misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/xgcc -v
Using builtin specs.
gcc version 2.8.1
misc/unix/gcc/build/egcs-1.0.3a/h8300-hitachi-coff/gcc/xgcc -v
Using builtin specs.
gcc version egcs-2.90.29 980515 (egcs-1.0.3 release)
Example compilation:
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/xgcc
-B/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/
-idirafter
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-hit
achi-coff/newlib/targ-include -idirafter
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include
-nostdinc -O2 -O2 -DSMALL_DTOA -DSMALL_MEMORY -fno-builtin
-I/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-h
itachi-coff/newlib/./targ-include
-I/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/./libc/include
-c ../../../../../src/newlib/libm/math/ef_fmod.c -v
Reading specs from
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/specs
gcc version 2.8.1
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/cpp
-lang-c -nostdinc -v
-I/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-h
itachi-coff/newlib/./targ-include
-I/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/./libc/include
-isystem
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/inclu
de -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -D__LONG_MAX__=2147483647L
-D__LONG_LONG_MAX__=2147483647L -D__LONG_MAX__=2147483647L
-D__LONG_LONG_MAX__=2147483647L -D__CHAR_UNSIGNED__ -D__OPTIMIZE__
-D__H8300__ -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int
-Acpu(h8300) -Amachine(h8300) -D__INT_MAX__=32767 -DSMALL_DTOA
-DSMALL_MEMORY -idirafter
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-hit
achi-coff/newlib/targ-include -idirafter
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include
../../../../../src/newlib/libm/math/ef_fmod.c /var/tmp/cca04439.i
GNU CPP version 2.8.1 (Hitachi H8/300)
#include "..." search starts here:
#include <...> search starts here:
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-hi
tachi-coff/newlib/targ-include
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/incl
ude
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/h8300-hi
tachi-coff/newlib/targ-include
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include
End of search list.
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/cc1
/var/tmp/cca04439.i -quiet -dumpbase ef_fmod.c -O2 -O2 -version
-fno-builtin -o /var/tmp/cca04439.s
GNU C version 2.8.1 (h8300-hitachi-coff) compiled by GNU C version 2.8.1.
/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/h8300-hitachi-coff/gcc/as -o
ef_fmod.o /var/tmp/cca04439.s
/var/tmp/cca04340.s: Assembler messages:
/var/tmp/cca04340.s:135: Error: invalid operands
/var/tmp/cca04340.s:203: Error: invalid operands
I have attached the preprocessed file (-E -o ef_fmod.i) and the resulting
assembler file (-S -o ef_fmod.s).
Regards,
Stefan
---
Stefan Becker
E-Mail: Stefan.Becker@nmp.nokia.com
# 1 "../../../../../src/newlib/libm/math/ef_fmod.c"
# 1 "../../../../../src/newlib/libm/math/fdlibm.h" 1
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/math.h" 1 3
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/sys/reent.h" 1 3
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/_ansi.h" 1 3
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/sys/config.h" 1 3
# 25 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/sys/config.h" 3
# 44 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/sys/config.h" 3
typedef long int __int32_t;
typedef unsigned long int __uint32_t;
# 15 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/_ansi.h" 2 3
# 61 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/_ansi.h" 3
# 13 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/sys/reent.h" 2 3
struct _glue
{
struct _glue *_next;
int _niobs;
struct __sFILE *_iobs;
};
struct _Bigint
{
struct _Bigint *_next;
int _k, _maxwds, _sign, _wds;
unsigned long _x[1];
};
struct _atexit {
struct _atexit *_next;
int _ind;
void (*_fns[32 ])();
};
struct __sbuf {
unsigned char *_base;
int _size;
};
typedef long _fpos_t;
struct __sFILE {
unsigned char *_p;
int _r;
int _w;
short _flags;
short _file;
struct __sbuf _bf;
int _lbfsize;
void * _cookie;
int (*_read) (void * _cookie, char *_buf, int _n) ;
int (*_write) (void * _cookie, const char *_buf, int _n) ;
_fpos_t (*_seek) (void * _cookie, _fpos_t _offset, int _whence) ;
int (*_close) (void * _cookie) ;
struct __sbuf _ub;
unsigned char *_up;
int _ur;
unsigned char _ubuf[3];
unsigned char _nbuf[1];
struct __sbuf _lb;
int _blksize;
int _offset;
struct _reent *_data;
};
struct _reent
{
int _errno;
struct __sFILE *_stdin, *_stdout, *_stderr;
int _inc;
char _emergency[25];
int _current_category;
const char *_current_locale;
int __sdidinit;
void (*__cleanup) (struct _reent *) ;
struct _Bigint *_result;
int _result_k;
struct _Bigint *_p5s;
struct _Bigint **_freelist;
int _cvtlen;
char *_cvtbuf;
unsigned char * _nextf[30 ];
unsigned int _nmalloc[30 ];
struct _atexit *_atexit;
struct _atexit _atexit0;
void (**(_sig_func))();
struct _glue __sglue;
struct __sFILE __sf[3];
};
extern struct _reent *_impure_ptr ;
void _reclaim_reent (struct _reent *) ;
# 9 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/math.h" 2 3
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/machine/ieeefp.h" 1 3
# 135 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/machine/ieeefp.h" 3
# 10 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/math.h" 2 3
union __dmath
{
__uint32_t i[2];
double d;
};
extern const union __dmath __infinity;
extern double atan (double) ;
extern double cos (double) ;
extern double sin (double) ;
extern double tan (double) ;
extern double tanh (double) ;
extern double frexp (double, int *) ;
extern double modf (double, double *) ;
extern double ceil (double) ;
extern double fabs (double) ;
extern double floor (double) ;
extern double acos (double) ;
extern double asin (double) ;
extern double atan2 (double, double) ;
extern double cosh (double) ;
extern double sinh (double) ;
extern double exp (double) ;
extern double ldexp (double, int) ;
extern double log (double) ;
extern double log10 (double) ;
extern double pow (double, double) ;
extern double sqrt (double) ;
extern double fmod (double, double) ;
extern double infinity (void) ;
extern double nan (void) ;
extern int isnan (double) ;
extern int isinf (double) ;
extern int finite (double) ;
extern double copysign (double, double) ;
extern int ilogb (double) ;
extern double asinh (double) ;
extern double cbrt (double) ;
extern double nextafter (double, double) ;
extern double rint (double) ;
extern double scalbn (double, int) ;
extern double log1p (double) ;
extern double expm1 (double) ;
extern double acosh (double) ;
extern double atanh (double) ;
extern double remainder (double, double) ;
extern double gamma (double) ;
extern double gamma_r (double, int *) ;
extern double lgamma (double) ;
extern double lgamma_r (double, int *) ;
extern double erf (double) ;
extern double erfc (double) ;
extern double y0 (double) ;
extern double y1 (double) ;
extern double yn (int, double) ;
extern double j0 (double) ;
extern double j1 (double) ;
extern double jn (int, double) ;
extern double hypot (double, double) ;
extern double cabs();
extern double drem (double, double) ;
extern float atanf (float) ;
extern float cosf (float) ;
extern float sinf (float) ;
extern float tanf (float) ;
extern float tanhf (float) ;
extern float frexpf (float, int *) ;
extern float modff (float, float *) ;
extern float ceilf (float) ;
extern float fabsf (float) ;
extern float floorf (float) ;
extern float acosf (float) ;
extern float asinf (float) ;
extern float atan2f (float, float) ;
extern float coshf (float) ;
extern float sinhf (float) ;
extern float expf (float) ;
extern float ldexpf (float, int) ;
extern float logf (float) ;
extern float log10f (float) ;
extern float powf (float, float) ;
extern float sqrtf (float) ;
extern float fmodf (float, float) ;
extern float infinityf (void) ;
extern float nanf (void) ;
extern int isnanf (float) ;
extern int isinff (float) ;
extern int finitef (float) ;
extern float copysignf (float, float) ;
extern int ilogbf (float) ;
extern float asinhf (float) ;
extern float cbrtf (float) ;
extern float nextafterf (float, float) ;
extern float rintf (float) ;
extern float scalbnf (float, int) ;
extern float log1pf (float) ;
extern float expm1f (float) ;
extern float acoshf (float) ;
extern float atanhf (float) ;
extern float remainderf (float, float) ;
extern float gammaf (float) ;
extern float gammaf_r (float, int *) ;
extern float lgammaf (float) ;
extern float lgammaf_r (float, int *) ;
extern float erff (float) ;
extern float erfcf (float) ;
extern float y0f (float) ;
extern float y1f (float) ;
extern float ynf (int, float) ;
extern float j0f (float) ;
extern float j1f (float) ;
extern float jnf (int, float) ;
extern float hypotf (float, float) ;
extern float cabsf();
extern float dremf (float, float) ;
extern int signgam;
struct exception
{
int type;
char *name;
double arg1;
double arg2;
double retval;
int err;
};
extern int matherr (struct exception *e) ;
enum __fdlibm_version
{
__fdlibm_ieee = -1,
__fdlibm_svid,
__fdlibm_xopen,
__fdlibm_posix
};
extern enum __fdlibm_version __fdlib_version ;
# 15 "../../../../../src/newlib/libm/math/fdlibm.h" 2
# 1 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/machine/ieeefp.h" 1 3
# 135 "/home/stefanb/misc/unix/gcc/build/gcc-2.8.1/src/newlib/libc/include/machine/ieeefp.h" 3
# 16 "../../../../../src/newlib/libm/math/fdlibm.h" 2
extern double logb (double) ;
extern double scalb (double, double) ;
extern double significand (double) ;
extern double __ieee754_sqrt (double) ;
extern double __ieee754_acos (double) ;
extern double __ieee754_acosh (double) ;
extern double __ieee754_log (double) ;
extern double __ieee754_atanh (double) ;
extern double __ieee754_asin (double) ;
extern double __ieee754_atan2 (double,double) ;
extern double __ieee754_exp (double) ;
extern double __ieee754_cosh (double) ;
extern double __ieee754_fmod (double,double) ;
extern double __ieee754_pow (double,double) ;
extern double __ieee754_lgamma_r (double,int *) ;
extern double __ieee754_gamma_r (double,int *) ;
extern double __ieee754_log10 (double) ;
extern double __ieee754_sinh (double) ;
extern double __ieee754_hypot (double,double) ;
extern double __ieee754_j0 (double) ;
extern double __ieee754_j1 (double) ;
extern double __ieee754_y0 (double) ;
extern double __ieee754_y1 (double) ;
extern double __ieee754_jn (int,double) ;
extern double __ieee754_yn (int,double) ;
extern double __ieee754_remainder (double,double) ;
extern __int32_t __ieee754_rem_pio2 (double,double*) ;
extern double __ieee754_scalb (double,double) ;
extern double __kernel_standard (double,double,int) ;
extern double __kernel_sin (double,double,int) ;
extern double __kernel_cos (double,double) ;
extern double __kernel_tan (double,double,int) ;
extern int __kernel_rem_pio2 (double*,double*,int,int,int,const __int32_t*) ;
extern float logbf (float) ;
extern float scalbf (float, float) ;
extern float significandf (float) ;
extern float __ieee754_sqrtf (float) ;
extern float __ieee754_acosf (float) ;
extern float __ieee754_acoshf (float) ;
extern float __ieee754_logf (float) ;
extern float __ieee754_atanhf (float) ;
extern float __ieee754_asinf (float) ;
extern float __ieee754_atan2f (float,float) ;
extern float __ieee754_expf (float) ;
extern float __ieee754_coshf (float) ;
extern float __ieee754_fmodf (float,float) ;
extern float __ieee754_powf (float,float) ;
extern float __ieee754_lgammaf_r (float,int *) ;
extern float __ieee754_gammaf_r (float,int *) ;
extern float __ieee754_log10f (float) ;
extern float __ieee754_sinhf (float) ;
extern float __ieee754_hypotf (float,float) ;
extern float __ieee754_j0f (float) ;
extern float __ieee754_j1f (float) ;
extern float __ieee754_y0f (float) ;
extern float __ieee754_y1f (float) ;
extern float __ieee754_jnf (int,float) ;
extern float __ieee754_ynf (int,float) ;
extern float __ieee754_remainderf (float,float) ;
extern __int32_t __ieee754_rem_pio2f (float,float*) ;
extern float __ieee754_scalbf (float,float) ;
extern float __kernel_sinf (float,float,int) ;
extern float __kernel_cosf (float,float) ;
extern float __kernel_tanf (float,float,int) ;
extern int __kernel_rem_pio2f (float*,float*,int,int,int,const __int32_t*) ;
typedef union
{
double value;
struct
{
__uint32_t msw;
__uint32_t lsw;
} parts;
} ieee_double_shape_type;
# 176 "../../../../../src/newlib/libm/math/fdlibm.h"
typedef union
{
float value;
__uint32_t word;
} ieee_float_shape_type;
# 22 "../../../../../src/newlib/libm/math/ef_fmod.c" 2
static const float one = 1.0, Zero[] = {0.0, -0.0,};
float __ieee754_fmodf(float x, float y)
{
__int32_t n,hx,hy,hz,ix,iy,sx,i;
do { ieee_float_shape_type gf_u; gf_u.value = ( x ); ( hx ) = gf_u.word; } while (0) ;
do { ieee_float_shape_type gf_u; gf_u.value = ( y ); ( hy ) = gf_u.word; } while (0) ;
sx = hx&0x80000000;
hx ^=sx;
hy &= 0x7fffffff;
if(hy==0||(hx>=0x7f800000)||
(hy>0x7f800000))
return (x*y)/(x*y);
if(hx<hy) return x;
if(hx==hy)
return Zero[(__uint32_t)sx>>31];
if(hx<0x00800000) {
for (ix = -126,i=(hx<<8); i>0; i<<=1) ix -=1;
} else ix = (hx>>23)-127;
if(hy<0x00800000) {
for (iy = -126,i=(hy<<8); i>=0; i<<=1) iy -=1;
} else iy = (hy>>23)-127;
if(ix >= -126)
hx = 0x00800000|(0x007fffff&hx);
else {
n = -126-ix;
hx = hx<<n;
}
if(iy >= -126)
hy = 0x00800000|(0x007fffff&hy);
else {
n = -126-iy;
hy = hy<<n;
}
n = ix - iy;
while(n--) {
hz=hx-hy;
if(hz<0){hx = hx+hx;}
else {
if(hz==0)
return Zero[(__uint32_t)sx>>31];
hx = hz+hz;
}
}
hz=hx-hy;
if(hz>=0) {hx=hz;}
if(hx==0)
return Zero[(__uint32_t)sx>>31];
while(hx<0x00800000) {
hx = hx+hx;
iy -= 1;
}
if(iy>= -126) {
hx = ((hx-0x00800000)|((iy+127)<<23));
do { ieee_float_shape_type sf_u; sf_u.word = ( hx|sx ); ( x ) = sf_u.value; } while (0) ;
} else {
n = -126 - iy;
hx >>= n;
do { ieee_float_shape_type sf_u; sf_u.word = ( hx|sx ); ( x ) = sf_u.value; } while (0) ;
x *= one;
}
return x;
}
; GCC For the Hitachi H8/300
; By Hitachi America Ltd and Cygnus Support
; release F-1
; -O2
.file "ef_fmod.c"
.section .rodata
.align 1
_one:
.float 1.00000000000000000000e0
.align 1
_Zero:
.float 0.00000000000000000000e0
.float -0.00000000000000000000e0
.section .text
.align 1
.global ___ieee754_fmodf
___ieee754_fmodf:
push r6
mov.w r7,r6
mov.w #32,r3
sub.w r3,sp
push r4
push r5
mov.w r0,@(-20,r6)
mov.w r1,@(-18,r6)
mov.w @(-20,r6),r2
mov.w @(-18,r6),r3
mov.w r2,@(-24,r6)
mov.w r3,@(-22,r6)
mov.w @(4,r6),r4
mov.w @(6,r6),r5
mov.w r4,@(-30,r6)
mov.w r5,@(-28,r6)
mov.w @(-24,r6),r2
mov.w @(-22,r6),r3
sub.w r3,r3
and #0,r2l
and #128,r2h
mov.w r2,@(-16,r6)
mov.w r3,@(-14,r6)
mov.w @(-24,r6),r4
mov.w @(-22,r6),r5
and #127,r4h
mov.w r4,@(-4,r6)
mov.w r5,@(-2,r6)
mov.w @(-30,r6),r2
mov.w @(-28,r6),r3
and #127,r2h
mov.w r2,@(-8,r6)
mov.w r3,@(-6,r6)
mov.w @(-8,r6),r3
mov.w @(-6,r6),r4
or r4l,r3l
or r4h,r3h; r4 or2
mov.w r3,r3
beq .L11
mov.w @(-4,r6),r5
mov.w #32639,r0
cmp.w r0,r5
bgt .L11
mov.w @(-8,r6),r1
mov.w #32640,r2
cmp.w r2,r1
bgt .L11
mov.w @(-8,r6),r3
cmp.w r2,r3
bne .L10
mov.w r4,r4
beq .L10
.L11:
mov.w @(4,r6),r2
mov.w @(6,r6),r3
mov.w r3,@-r7
mov.w r2,@-r7
mov.w @(-20,r6),r0
mov.w @(-18,r6),r1
jsr @___mulsf3
adds #2,r7
adds #2,r7
mov.w r0,@(-30,r6)
mov.w r1,@(-28,r6)
mov.w r1,@-r7
mov.w r0,@-r7
mov.w @(-30,r6),r0
mov.w @(-28,r6),r1
jsr @___divsf3
adds #2,r7
adds #2,r7
mov.w r0,@(-30,r6)
mov.w r1,@(-28,r6)
jmp @.L67
.L10:
mov.w @(-4,r6),r3
mov.w r3,@(-32,r6)
mov.w @(-8,r6),r4
cmp.w r3,r4
ble tl500
jmp @.L62
tl500:
mov.w @(-8,r6),r5
cmp.w r3,r5
bne .L13
mov.w @(-2,r6),r0
mov.w @(-6,r6),r1
cmp.w r0,r1
bls tl501
jmp @.L62
tl501:
.L13:
mov.w @(-8,r6),r2
mov.w @(-4,r6),r3
cmp.w r2,r3
bne .L15
mov.w @(-6,r6),r4
mov.w @(-2,r6),r5
cmp.w r4,r5
bne tl502
jmp @.L68
tl502:
.L15:
mov.w @(-4,r6),r4
mov.w #127,r5
cmp.w r5,r4
ble tl503
jmp @.L16
tl503:
mov.w #65535,r2
mov.w #65410,r3
mov.w r2,@(-30,r6)
mov.w r3,@(-28,r6)
mov.w @(-4,r6),r4
mov.w @(-2,r6),r5
mov.b r4l,r4hn mov.b r5h,r4l
mov.b r5l,r5h
sub.b r5l,r5l
mov.w r4,@(-24,r6)
mov.w r5,@(-22,r6)
mov.w @(-24,r6),r1
bgt .L21
mov.w @(-24,r6),r2
beq tl504
jmp @.L24
tl504:
mov.w @(-22,r6),r3
bne tl505
jmp @.L24
tl505:
.L21:
mov.w @(-30,r6),r4
mov.w @(-28,r6),r5
add #255,r5l
addx #255,r5h
addx #255,r4l
addx #255,r4h
mov.w r4,@(-30,r6)
mov.w r5,@(-28,r6)
mov.w @(-24,r6),r2
mov.w @(-22,r6),r3
add.w r3,r3
addx r2l,r2l
addx r2h,r2h
mov.w r2,@(-24,r6)
mov.w r3,@(-22,r6)
mov.w @(-24,r6),r3
bgt .L21
mov.w @(-24,r6),r4
bne .L24
mov.w @(-22,r6),r5
bne .L21
bra .L24
.L16:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
mov.b #23,r4l
.Llt3:
shar r2h
rotxr r2l
rotxr r3h
rotxr r3l
add #0xff,r4l
bne .Llt3
add #129,r3l
addx #255,r3h
addx #255,r2l
addx #255,r2h
mov.w r2,@(-30,r6)
mov.w r3,@(-28,r6)
.L24:
mov.w @(-8,r6),r5
mov.w #127,r0
cmp.w r0,r5
ble tl506
jmp @.L25
tl506:
mov.w #65535,r2
mov.w #65410,r3
mov.w r2,@(-12,r6)
mov.w r3,@(-10,r6)
mov.w @(-8,r6),r4
mov.w @(-6,r6),r5
mov.b r4l,r4hn mov.b r5h,r4l
mov.b r5l,r5h
sub.b r5l,r5l
mov.w r4,@(-24,r6)
mov.w r5,@(-22,r6)
mov.w @(-24,r6),r1
blt .L33
.L30:
mov.w @(-12,r6),r2
mov.w @(-10,r6),r3
add #255,r3l
addx #255,r3h
addx #255,r2l
addx #255,r2h
mov.w r2,@(-12,r6)
mov.w r3,@(-10,r6)
mov.w @(-24,r6),r4
mov.w @(-22,r6),r5
add.w r5,r5
addx r4l,r4l
addx r4h,r4h
mov.w r4,@(-24,r6)
mov.w r5,@(-22,r6)
mov.w @(-24,r6),r5
blt .L33
bra .L30
.L25:
mov.w @(-8,r6),r2
mov.w @(-6,r6),r3
mov.b #23,r4l
.Llt6:
shar r2h
rotxr r2l
rotxr r3h
rotxr r3l
add #0xff,r4l
bne .Llt6
add #129,r3l
addx #255,r3h
addx #255,r2l
addx #255,r2h
mov.w r2,@(-12,r6)
mov.w r3,@(-10,r6)
.L33:
mov.w @(-30,r6),r5
mov.w #-1,r0
cmp.w r0,r5
blt .L34
mov.w @(-30,r6),r1
cmp.w r0,r1
bne .L35
mov.w @(-28,r6),r2
mov.w #-126,r3
cmp.w r3,r2
blo .L34
.L35:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
and #127,r2l
and #0,r2h
or #128,r2l
bra .L69
.L34:
mov.b #-126,r4l
mov.b @(-27,r6),r5l
sub.b r5l,r4l
mov.b r4l,@(-26,r6)
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
mov.b r4l,r5l
ble .Lle7
.Llt7:
add.w r3,r3
addx r2l,r2l
addx r2h,r2h
add #0xff,r5l
bne .Llt7
.Lle7:
.L69:
mov.w r2,@(-4,r6)
mov.w r3,@(-2,r6)
mov.w @(-12,r6),r0
mov.w #-1,r1
cmp.w r1,r0
blt .L37
mov.w @(-12,r6),r2
cmp.w r1,r2
bne .L38
mov.w @(-10,r6),r3
mov.w #-126,r4
cmp.w r4,r3
blo .L37
.L38:
mov.w @(-8,r6),r2
mov.w @(-6,r6),r3
and #127,r2l
and #0,r2h
or #128,r2l
bra .L70
.L37:
mov.b #-126,r5l
mov.b @(-9,r6),r0l
sub.b r0l,r5l
mov.b r5l,@(-26,r6)
mov.w @(-8,r6),r2
mov.w @(-6,r6),r3
mov.b @(-26,r6),r4l
mov.b r4l,r5l
ble .Lle8
.Llt8:
add.w r3,r3
addx r2l,r2l
addx r2h,r2h
add #0xff,r5l
bne .Llt8
.Lle8:
.L70:
mov.w r2,@(-8,r6)
mov.w r3,@(-6,r6)
mov.w @(-30,r6),r2
mov.w @(-28,r6),r3
mov.w @(-12,r6),r4
mov.w @(-10,r6),r5
sub.w r5,r3
subx r4l,r2l
subx r4h,r2h
add #255,r3l
addx #255,r3h
addx #255,r2l
addx #255,r2h
mov.w r2,@(-20,r6)
mov.w r3,@(-18,r6)
bra .L71
.L42:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
mov.w @(-8,r6),r4
mov.w @(-6,r6),r5
sub.w r5,r3
subx r4l,r2l
subx r4h,r2h
mov.w r2,@(-30,r6)
mov.w r3,@(-28,r6)
mov.w @(-30,r6),r5
bge .L43
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
bra .L72
.L43:
mov.w @(-30,r6),r3
mov.w @(-28,r6),r4
or r4l,r3l
or r4h,r3h; r4 or2
mov.w r3,r3
bne tl507
jmp @.L68
tl507:
mov.w @(-30,r6),r2
mov.w @(-28,r6),r3
.L72:
add.w r3,r3
addx r2l,r2l
addx r2h,r2h
mov.w r2,@(-4,r6)
mov.w r3,@(-2,r6)
mov.w @(-20,r6),r4
mov.w @(-18,r6),r5
add #255,r5l
addx #255,r5h
addx #255,r4l
addx #255,r4h
mov.w r4,@(-20,r6)
mov.w r5,@(-18,r6)
.L71:
mov.w @(-20,r6),r5
mov.w #-1,r0
cmp.w r0,r5
beq tl508
jmp @.L42
tl508:
mov.w @(-18,r6),r1
cmp.w r0,r1
beq tl509
jmp @.L42
tl509:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
mov.w @(-8,r6),r4
mov.w @(-6,r6),r5
sub.w r5,r3
subx r4l,r2l
subx r4h,r2h
mov.w r2,@(-30,r6)
mov.w r3,@(-28,r6)
mov.w @(-30,r6),r5
blt .L48
mov.w r2,@(-4,r6)
mov.w r3,@(-2,r6)
.L48:
mov.w @(-4,r6),r3
mov.w @(-2,r6),r4
or r4l,r3l
or r4h,r3h; r4 or2
mov.w r3,r3
bne tl510
jmp @.L68
tl510:
mov.w @(-4,r6),r4
mov.w #127,r5
cmp.w r5,r4
bgt .L52
.L53:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
add.w r3,r3
addx r2l,r2l
addx r2h,r2h
mov.w r2,@(-4,r6)
mov.w r3,@(-2,r6)
mov.w @(-12,r6),r4
mov.w @(-10,r6),r5
add #255,r5l
addx #255,r5h
addx #255,r4l
addx #255,r4h
mov.w r4,@(-12,r6)
mov.w r5,@(-10,r6)
mov.w @(-4,r6),r5
mov.w #127,r0
cmp.w r0,r5
ble .L53
.L52:
mov.w @(-12,r6),r1
mov.w #-1,r2
cmp.w r2,r1
bge tl511
jmp @.L56
tl511:
mov.w @(-12,r6),r3
cmp.w r2,r3
bne .L57
mov.w @(-10,r6),r4
mov.w #-126,r5
cmp.w r5,r4
bhs tl512
jmp @.L56
tl512:
.L57:
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
add #0,r3l
addx #0,r3h
addx #128,r2l
addx #255,r2h
mov.w @(-12,r6),r4
mov.w @(-10,r6),r5
add #127,r5l
addx #0,r5h
addx #0,r4l
addx #0,r4h
mov.b #23,r0l
.Llt9:
add.w r5,r5
addx r4l,r4l
addx r4h,r4h
add #0xff,r0l
bne .Llt9
or r3l,r5l
or r3h,r5h
or r2l,r4l
or r2h,r4h
mov.w r4,@(-4,r6)
mov.w r5,@(-2,r6)
mov.w @(-16,r6),r2
mov.w @(-14,r6),r3
or r3l,r5l
or r3h,r5h
or r2l,r4l
or r2h,r4h
mov.w r4,@(-24,r6)
mov.w r5,@(-22,r6)
mov.w @(-24,r6),r4
mov.w @(-22,r6),r5
mov.w r4,@(-20,r6)
mov.w r5,@(-18,r6)
jmp @.L62
.L68:
mov.w @(-16,r6),r2
mov.w @(-14,r6),r3
sub.w r3,r3
shll r2h
mov.w r3,r2
rotxl r3l
mov.w r2,@(-24,r6)
mov.w r3,@(-22,r6)
mov.w @(-22,r6),r5
add.w r5,r5
add.w r5,r5
mov.w r5,r3
mov.w @(_Zero,r3),r2
mov.w @(_Zero+2,r3),r3
mov.w r2,@(-30,r6)
mov.w r3,@(-28,r6)
mov.w @(-30,r6),r0
mov.w @(-28,r6),r1
bra .L67
.L56:
mov.b #-126,r4l
mov.b @(-9,r6),r5l
sub.b r5l,r4l
mov.b r4l,@(-26,r6)
mov.w @(-4,r6),r2
mov.w @(-2,r6),r3
mov.b r4l,r5l
ble .Lle12
.Llt12:
shar r2h
rotxr r2l
rotxr r3h
rotxr r3l
add #0xff,r5l
bne .Llt12
.Lle12:
mov.w r2,@(-4,r6)
mov.w r3,@(-2,r6)
mov.w @(-16,r6),r4
mov.w @(-14,r6),r5
or r5l,r3l
or r5h,r3h
or r4l,r2l
or r4h,r2h
mov.w r2,@(-24,r6)
mov.w r3,@(-22,r6)
mov.w @(-24,r6),r2
mov.w @(-22,r6),r3
mov.w r2,@(-20,r6)
mov.w r3,@(-18,r6)
.L62:
mov.w @(-20,r6),r0
mov.w @(-18,r6),r1
.L67:
pop r5
pop r4
mov.w #32,r3
add.w r3,sp
pop r6
rts
.end