diff options
author | Robert de Bath <rdebath@poboxes.com> | 1998-07-01 01:00:00 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:40:31 +0200 |
commit | ec5f28e3f1400b5dacb88eda2d9db472a20b4349 (patch) | |
tree | b3215b2306709d0412fd7845c78ca63ccaa2e29b /bcc/floatop.c | |
parent | 2f828530e36a02c5b4c534e42ab812370c2bf7d9 (diff) | |
download | dev86-ec5f28e3f1400b5dacb88eda2d9db472a20b4349.tar.gz |
Import Dev86src-0.14.3.tar.gzv0.14.3
Diffstat (limited to 'bcc/floatop.c')
-rw-r--r-- | bcc/floatop.c | 34 |
1 files changed, 27 insertions, 7 deletions
diff --git a/bcc/floatop.c b/bcc/floatop.c index 38b0e52..199c562 100644 --- a/bcc/floatop.c +++ b/bcc/floatop.c @@ -22,18 +22,38 @@ struct symstruct *target; { if (target->storage == CONSTANT) { - /* XXX - more for non-386 */ - if (target->type->scalar & FLOAT) +#ifdef I80386 + if (i386_32) { - float val; + if (target->type->scalar & FLOAT) + { + float val; - val = *target->offset.offd; - push(constsym(((value_t *) &val)[0])); + val = *target->offset.offd; + push(constsym(((value_t *) &val)[0])); + } + else + { + push(constsym(((value_t *) target->offset.offd)[1])); + push(constsym(((value_t *) target->offset.offd)[0])); + } } else +#endif { - push(constsym(((value_t *) target->offset.offd)[1])); - push(constsym(((value_t *) target->offset.offd)[0])); + if (target->type->scalar & FLOAT) + { + float val = *target->offset.offd; + push(constsym( ((unsigned short*) &val)[1] )); + push(constsym( ((unsigned short*) &val)[0] )); + } + else + { + push(constsym(((unsigned short*) target->offset.offd)[3])); + push(constsym(((unsigned short*) target->offset.offd)[2])); + push(constsym(((unsigned short*) target->offset.offd)[1])); + push(constsym(((unsigned short*) target->offset.offd)[0])); + } } } else if (target->type->scalar & FLOAT) |