Mercurial > hg > xemacs-beta
annotate src/m/hp800.h @ 5736:3192994c49ca
Convert C (un)signed long long values to bignums properly.
This patch also does the following:
- Uses make_fixnum instead of make_integer when the argument is guaranteed to
be in the fixnum range.
- Introduces make_unsigned_integer so that we handle unsigned values with the
high bit set correctly.
- Introduces conversions between bignums and (un)signed long long values.
- Uses mp_set_memory_functions with the BSD MP code, if it exists.
- Eliminates some unnecessary consing in the Lisp + and * implementations.
- Fixes a problem with check_valid_xbm_inline(). This function is called
during intialization. It calls Ftimes. When using pdump, this is a
problem, because (a) the bignum code is not initialized until *after*
dumping, so we don't try to dump any bignums, and (b) multiplication of
integers is done inside bignums so we handle fixnum overflow correctly. I
decided that an XBM file with dimensions that don't fit into fixnums is
probably not something we want to try to handle anyway, and did the
arithmetic with C values instead of Lisp values. Doing that broke one test,
which started getting a different error message from the one it expected, so
I adjusted the test to match the new reality.
- Fixes a few miscellaneous bugs in the BSD MP code.
See <CAHCOHQk0u0=eD1fUMHTNWi2Yh=1WgiYyCXdMbsGzHBNhdqYz4w@mail.gmail.com> in
xemacs-patches, as well as followup messages.
author | Jerry James <james@xemacs.org> |
---|---|
date | Mon, 17 Jun 2013 10:23:00 -0600 |
parents | 1f0b15040456 |
children |
rev | line source |
---|---|
428 | 1 /* machine description file for hp9000 series 800 machines. |
2 Copyright (C) 1987 Free Software Foundation, Inc. | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
3 Copyright (C) 2010 Ben Wing. |
428 | 4 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
5 This file is part of XEmacs. |
428 | 6 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
7 XEmacs is free software: you can redistribute it and/or modify it |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
8 under the terms of the GNU General Public License as published by the |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
9 Free Software Foundation, either version 3 of the License, or (at your |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
10 option) any later version. |
428 | 11 |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
12 XEmacs is distributed in the hope that it will be useful, but WITHOUT |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
15 for more details. |
428 | 16 |
17 You should have received a copy of the GNU General Public License | |
5402
308d34e9f07d
Changed bulk of GPLv2 or later files identified by script
Mats Lidell <matsl@xemacs.org>
parents:
2367
diff
changeset
|
18 along with XEmacs. If not, see <http://www.gnu.org/licenses/>. */ |
428 | 19 |
20 /* Synched up with: FSF 19.31. */ | |
21 | |
22 /* The following line tells the configuration script what sort of | |
23 operating system this machine is likely to run. | |
24 USUAL-OPSYS="hpux" */ | |
25 | |
26 /* Now define a symbol for the cpu type, if your compiler | |
27 does not define it automatically: | |
28 Ones defined so far include vax, m68000, ns16000, pyramid, | |
29 orion, tahoe, APOLLO and many others */ | |
30 #ifndef hp9000s800 | |
31 # define hp9000s800 | |
32 #endif | |
33 | |
34 | |
35 #ifdef __hpux | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
36 |
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
37 #ifdef ENABLE_SM_FILE_DECLS_OF_LOADAVG_STUFF |
428 | 38 |
39 /* Data type of load average, as read out of kmem. */ | |
40 | |
41 #define LOAD_AVE_TYPE double | |
42 | |
43 /* Convert that into an integer that is 100 for a load average of 1.0 */ | |
44 | |
45 #define LOAD_AVE_CVT(x) ((int) (x * 100.0)) | |
46 | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
47 #endif /* ENABLE_SM_FILE_DECLS_OF_LOADAVG_STUFF */ |
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
48 |
428 | 49 /* the data segment on this machine always starts at address 0x40000000. */ |
50 | |
51 #ifdef DATA_START | |
52 #undef DATA_START | |
53 #endif | |
54 #ifdef TEXT_START | |
55 #undef TEXT_START | |
56 #endif | |
57 | |
58 #define DATA_START 0x40000000 | |
59 #define TEXT_START 0x00000000 | |
60 | |
61 /* Define NO_REMAP if memory segmentation makes it not work well | |
62 to change the boundary between the text section and data section | |
63 when Emacs is dumped. If you define this, the preloaded Lisp | |
64 code will not be sharable; but that's better than failing completely. */ | |
65 | |
66 #define NO_REMAP | |
67 | |
68 /* This machine requires completely different unexec code | |
69 which lives in a separate file. Specify the file name. */ | |
70 | |
71 #define UNEXEC "unexhp9k800.o" | |
72 | |
73 | |
5494
861f2601a38b
Sync s/ files with GNU 23.1.92, delete obsolete stuff, simplify other stuff
Ben Wing <ben@xemacs.org>
parents:
2367
diff
changeset
|
74 /* Deleted LDAV_SYMBOL, handled in getloadavg.c */ |
428 | 75 |
76 #if 0 /* Supposedly no longer true. */ | |
77 /* In hpux, for unknown reasons, S_IFLNK is defined even though | |
78 symbolic links do not exist. | |
79 Make sure our conditionals based on S_IFLNK are not confused. | |
80 | |
81 Here we assume that stat.h is included before config.h | |
82 so that we can override it here. */ | |
83 | |
84 #undef S_IFLNK | |
85 #endif | |
86 | |
87 #endif /* __hpux */ |