Bill Currie
|
993d05b3d3
|
Support taking the address of alias expressions.
Taking the address of an alias expression undoes the alias but uses the
aliased type.
|
2011-03-06 15:58:49 +09:00 |
|
Bill Currie
|
b74c644a10
|
Perform offset field relocations.
|
2011-03-06 15:41:38 +09:00 |
|
Bill Currie
|
8712d30d1a
|
Make entity field defs static.
Entity field defs need to be static in order to avoid clashing with their
field variables.
|
2011-03-06 15:41:15 +09:00 |
|
Bill Currie
|
c4e9a45d91
|
Do not lose the entity field defs.
|
2011-03-06 15:40:07 +09:00 |
|
Bill Currie
|
b7aa2f6786
|
Support access to struct fields in a structure in an entity.
|
2011-03-06 15:39:27 +09:00 |
|
Bill Currie
|
fe3d228658
|
Maintain a symbol table for entity fields.
|
2011-03-06 15:38:19 +09:00 |
|
Bill Currie
|
c29e0250e4
|
Make def_field_Ofs reloc dumps more informative.
|
2011-03-06 15:34:53 +09:00 |
|
Bill Currie
|
02766f0795
|
Do not try to dump def values from spaces with no data.
|
2011-03-06 15:33:53 +09:00 |
|
Bill Currie
|
1eb759bb8a
|
Update reloc_names.
I really need to get reloc_names unduplicated.
|
2011-03-06 15:33:10 +09:00 |
|
Bill Currie
|
d1187f0857
|
Set the edict area size when dumping qfo files.
|
2011-03-06 13:41:00 +09:00 |
|
Bill Currie
|
7bfaf107ce
|
Set the output file name as early as possible.
|
2011-03-06 13:40:24 +09:00 |
|
Bill Currie
|
417d1b4442
|
Fix structure copy into and out of entities.
|
2011-03-06 13:19:20 +09:00 |
|
Bill Currie
|
dc7a78b2ff
|
Fix case label type conversions.
The previous method made too many assumptions.
|
2011-03-06 11:41:01 +09:00 |
|
Bill Currie
|
fe4df03896
|
Add is_float ().
For now, it checks just floats, but I might one day add doubles.
|
2011-03-06 11:35:15 +09:00 |
|
Bill Currie
|
85bffbcad0
|
Add is_integral() to check for integral types (integer, short, enum).
|
2011-03-06 11:25:12 +09:00 |
|
Bill Currie
|
17a9dff769
|
Avoid freeing an operand twice.
Due to the way operands are used, they can be freed twice in dead-statement
removal. Detect the double-free and ignore it.
|
2011-03-06 11:19:09 +09:00 |
|
Bill Currie
|
28f4de94d2
|
Fix switch statements so the work in the new scheme.
Convert case labels to be the same type as the switch expression.
Use alias expressions for the various test expressions.
|
2011-03-06 00:29:29 +09:00 |
|
Bill Currie
|
8cfa80b5d4
|
Implement think expressions.
|
2011-03-05 18:01:37 +09:00 |
|
Bill Currie
|
7209c61912
|
Fix initializing local float variables with an integer constant.
Run the assignment expression through fold_constants to handle any
necessary conversions and error checking.
|
2011-03-05 17:23:58 +09:00 |
|
Bill Currie
|
a3c1f339fc
|
Gracefully handle undefined symbols in entity field expressions.
|
2011-03-05 17:22:04 +09:00 |
|
Bill Currie
|
fbea276ede
|
Yet more tests.
|
2011-03-05 17:21:19 +09:00 |
|
Bill Currie
|
7314b944d5
|
Bring back the offset alias support.
Accidently nuked it when fixing .return etc.
|
2011-03-05 16:31:32 +09:00 |
|
Bill Currie
|
e7e8220246
|
Dump code addresses as hex, too.
|
2011-03-05 16:25:56 +09:00 |
|
Bill Currie
|
2f74e6e4bf
|
Nuke the old progs global.
It is no longer needed thanks to the new qfo conversion functions.
|
2011-03-05 16:24:53 +09:00 |
|
Bill Currie
|
fcb567fc98
|
Use the correct function number when updating the function def.
Functions are 1 based in progs bug 0 based in qfo files.
|
2011-03-05 16:00:39 +09:00 |
|
Bill Currie
|
535dfad305
|
Emit defs for far data.
They will break when the offsets exceed 64k, but they are needed for
debugging.
|
2011-03-05 15:59:14 +09:00 |
|
Bill Currie
|
97b1ceceb0
|
Fix line number info.
line number info is now 1 based rather than 0 based (to better detect when
a function does not have line number info).
|
2011-03-05 15:40:08 +09:00 |
|
Bill Currie
|
1dea86a3e4
|
Update debug info loading when dumping qfo files.
|
2011-03-05 14:53:41 +09:00 |
|
Bill Currie
|
cfefd79e07
|
Fix the source of bogus string relocs.
Nested aggregate initializers were corrupting themselves.
|
2011-03-05 09:21:12 +09:00 |
|
Bill Currie
|
7c95913c61
|
Avoid segfaulting with bad string relocs.
|
2011-03-05 09:07:16 +09:00 |
|
Bill Currie
|
8eb5fd653a
|
Perform the relocations!!!
line numbers seem to be broken, but the code itself looks good.
|
2011-03-05 08:41:14 +09:00 |
|
Bill Currie
|
fe7be543f8
|
Correctly update the offset of code relocs.
|
2011-03-05 08:39:47 +09:00 |
|
Bill Currie
|
7fd839a5ed
|
Handle chains of alias defs so relocs will be emitted.
|
2011-03-05 08:39:16 +09:00 |
|
Bill Currie
|
bbedbf5c9c
|
Add the .return etc symbols to the symbol table.
This puts their defs into the object file.
|
2011-03-05 08:37:51 +09:00 |
|
Bill Currie
|
c3f1c186f8
|
Resolve types of .return etc.
|
2011-03-05 08:36:55 +09:00 |
|
Bill Currie
|
af7bc81e16
|
Chain the types for the linker.
|
2011-03-05 08:35:56 +09:00 |
|
Bill Currie
|
0bd0f783b2
|
Update def offsets with their final locations.
|
2011-03-04 23:37:46 +09:00 |
|
Bill Currie
|
6d02555ca9
|
Reorganize the offset calculations.
keep the offset calculations separate from the data transfers for better
clarity in what is happening.
|
2011-03-04 23:31:09 +09:00 |
|
Bill Currie
|
e62163e569
|
Nuke any invalidated relocs.
|
2011-03-04 21:46:19 +09:00 |
|
Bill Currie
|
2565e0db32
|
Update reloc targets when linking.
|
2011-03-04 21:29:47 +09:00 |
|
Bill Currie
|
bc78b84869
|
Set the target of string relocs to the string index.
|
2011-03-04 21:29:10 +09:00 |
|
Bill Currie
|
7fb22bd1e4
|
Make D_STRING() more useful and add D_GETSTR()
|
2011-03-04 21:28:12 +09:00 |
|
Bill Currie
|
e04f6266b1
|
Nuke def_list from defref_t.
It didn't work :/.
|
2011-03-04 20:40:01 +09:00 |
|
Bill Currie
|
5a552d8841
|
Add the null function.
|
2011-03-04 20:29:40 +09:00 |
|
Bill Currie
|
368a3826be
|
Redo the offset and size calculations for qfo_to_progs().
|
2011-03-04 20:14:02 +09:00 |
|
Bill Currie
|
cd12a78f93
|
Replace some accidentally deleted code.
Forgot to commit it the first time round, then rebase messed me up and I
didn't notice until after pushing. *sigh*
|
2011-03-04 19:02:47 +09:00 |
|
Bill Currie
|
72fae608e5
|
Write the function start address to the progs file.
Oops:P
|
2011-03-04 18:46:28 +09:00 |
|
Bill Currie
|
2211a807d4
|
Do not relocate builtin functions.
|
2011-03-04 18:46:25 +09:00 |
|
Bill Currie
|
d6d8b5b49d
|
Generate the debug symbol file.
|
2011-03-04 18:46:05 +09:00 |
|
Bill Currie
|
9a96febdf5
|
Fix the hordes of bogus defs.
They were caused by unused external defs, so not processing unused externs
in the first place is the simplest solution.
|
2011-03-04 14:51:09 +09:00 |
|