ngf8.c 566 B

12345678910111213141516171819202122232425262728
  1. /*
  2. (c) copyright 1988 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. /*
  7. NEGATE A FLOATING POINT (NGF 8)
  8. */
  9. /********************************************************/
  10. #include "FP_types.h"
  11. #include "get_put.h"
  12. #define OFF ((FL_MSL_AT_LOW_ADDRESS ? 0 : 4) + (FL_MSW_AT_LOW_ADDRESS ? 0 : 2) + (FL_MSB_AT_LOW_ADDRESS ? 0 : 1))
  13. void
  14. ngf8(f)
  15. DOUBLE f;
  16. {
  17. unsigned char *p;
  18. if (f.d[0] != 0 || f.d[1] != 0) {
  19. p = (unsigned char *) &f + OFF;
  20. *p ^= 0x80;
  21. }
  22. }