Commit graph

18 commits

Author SHA1 Message Date
Tee-Kiah Chia 64a74b4e09 Add .seek asm pseudo-op, advances location counter to fixed offset
The new .seek assembler pseudo-op advances the location
counter to a fixed offset within a section --- or to a fixed
address, if the section is a .base'd section.  It works
somewhat like the GNU assembler's .org pseudo-op, though
with a hopefully less confusing name.

This pseudo-op lets us avoid having to manually compute the
needed boot sector padding in the pc86 start-up code
plat/pc86/boot.s .
2021-03-19 13:36:24 +00:00
George Koehler a434749fd9 Widen valu_t in the assembler to 64 bits.
Most machines had undefined valu_t and redefined it to a different
type.  Edit mach/*/as/mach0.c to remove such redefinitions, so the
next change to valu_t will affect all machines.

Edit mach/proto/as/comm0.h to change valu_t to int64_t, and add
uvalu_t and uint64_t.

Remove int64_t y_valu8 from the yacc %union, now that valu_t y_valu
can hold 64 bits.  Replace y_valu8 with y_valu.  The .data8 pseudo
becomes less special; it now accepts absolute expressions.

This change simplifies the assembler and seems to have no effect on
the assembled output.  Among the files in share/ack/examples, the only
changes are in hilo_bas.* and startrek_c.linuxppc, but those files
seem to change whenever I rebuild them.
2019-10-04 18:58:56 -04:00
George Koehler 054b9c87e1 Add .data8 for 8-byte literal integers to the assembler.
This takes literal integers, not expressions, because each machine
defines its own valu_t for expressions, but valu_t can be too narrow
for an 8-byte integer, and I don't want to change all the machines to
use a wider valu_t.  Instead, change how the assembler parses literal
integers.  Remove the NUMBER token and add a NUMBER8 token for an
int64_t.  The new .data8 pseudo emits all 8 bytes of the int64_t;
expressions narrow the int64_t to a valu_t.  Don't add any checks for
integer overflow; expressions and .data* pseudos continue to ignore
overflow when a number is too wide.

This commit requires int64_t and uint64_t in the C compiler to build
the assembler.  The ACK's own C compiler doesn't have these.

For the assembler's temporary file, add NUMBER4 to store 4-byte
integers.  NUMBER4 acts like NUMBER[0-3] and only stores a
non-negative integer.  Each negative integer now takes 8 bytes (up
from 4) in the temporary file.

Move the `\fI` and `\fP` in the uni_ass(6) manual, so the square
brackets in `thing [, thing]*` are not italic.  This looks nicer in my
terminal, where italic text is underlined.
2019-08-13 11:47:44 -04:00
David Given 642956fa2f mcg now uses dataf4 and dataf8 to emit floating point constants, and so doesn't
need flt_arith any more. (And also generates them correctly on little-endian
systems.) as now parses numbers properly, doesn't trash memory all over the
place, and can handle negative numbers.
2018-09-12 23:19:32 +02:00
David Given a1747ac916 Add the .dataf4 and .dataf8 directives to the assembler --- manually converting
floats and doubles to bytes is not fun. It might even work!
2018-09-10 22:56:18 +02:00
David Given 0d8d98fd0f Warning fix. 2018-09-09 12:22:59 +02:00
ceriel 1db6a3029b Header --> Id 1994-06-24 14:02:31 +00:00
ceriel 53c4951b29 Do not use '#endif/#else xxx'; it is not allowed for ANSI C 1991-12-17 15:05:43 +00:00
ceriel 0c59e2e12d Prevent name clashes with sys/types.h on system V 1991-12-16 15:24:24 +00:00
ceriel 0b26bdf5fb Some changes in search for more efficiency 1991-01-11 14:20:59 +00:00
ceriel e0ff37aa6e support for long strings 1990-08-01 14:30:45 +00:00
ceriel 5c0938d05b Added some more support for debugger 1990-07-30 09:43:45 +00:00
ceriel 0c5cce9a96 max filename length too short in error messages 1990-01-31 16:27:05 +00:00
ceriel 4c76583aba simplified assertion 1989-01-19 13:48:09 +00:00
ceriel 6eaf182cee Added Rcs Id 1987-03-10 11:49:39 +00:00
ceriel 815166e421 Added copyright notice 1987-03-09 19:15:41 +00:00
ceriel e188fe0956 Version that uses libobject.a 1986-12-01 15:41:29 +00:00
keie 772b64fabd *** empty log message *** 1985-04-12 16:56:43 +00:00