Bill Currie
5231e8e9f8
Handle .zero, .return and .param* properly.
2011-01-26 08:01:24 +09:00
Bill Currie
6ce3c5a59a
Get statments being emitted to the code segment.
...
The first function seems to work fine, but there's a problems with the
scope of params causing params to get their knickers in a twist (tangled
linked list).
2011-01-25 15:46:48 +09:00
Bill Currie
ade2e92ea4
Fix the immediate breakage in immediate handling.
2011-01-25 09:08:11 +09:00
Bill Currie
afc5b2827d
Simplify def handling, use far data.
...
Since there is now a proper symbol table, defs are now just references to
memory locations and the symbol table takes care of duplicates.
Also, start using far data for ObjQC structures.
The qfo functions have been stubbed out until I figure out what to do with
object files in the new scheme.
2011-01-24 15:41:43 +09:00
Bill Currie
5deda9c9b9
Clean out ex_def as ex_symbol replaces it.
2011-01-19 22:25:04 +09:00
Bill Currie
e08efe036b
Move the constant expression values into their own struct.
2011-01-19 08:43:24 +09:00
Bill Currie
ea3895805b
Rewrite much to use symbols and symtabs. Gut emit.c. Massive breakage.
...
That which isn't rewritten is horribly broken. However, this does include a
nice mechanism for building QC structs for emitting data.
emit.c has been gutted in the spirit of "throw one away".
There is much work to be done to get even variables emitted, let alone
code. Things should be a little more fun from here on.
2011-01-17 22:34:41 +09:00
Bill Currie
75ec6bf244
Clean out some unnecessary types from the progs engine and clean up the mess.
...
This is a nasty commit, sorry, but 99% of the commit is interdependent.
2011-01-10 12:25:31 +09:00
Bill Currie
67beaf4487
Nil is a constant, so allow it in global initializers.
2010-11-24 17:01:18 +09:00
Bill Currie
3431fea56d
Make sure initialized locals that are treated as constants don't get relocated. Fixes the airfist bug in prozac
2007-09-15 07:58:39 +00:00
Bill Currie
0382b05780
various unsigned long -> uintptr_t conversions
2007-04-04 11:22:48 +00:00
Bill Currie
3fb03fc2be
hah, should have been using __attribute__((used)) all that time (rather
...
than __attribute__((unused))). fixes the missing console in -x11
2005-08-04 15:27:09 +00:00
Bill Currie
9f662787e0
get struct copy to/from struct fields via pointers. fixes a bug found by
...
snax
2005-06-09 10:34:03 +00:00
Bill Currie
4d044bfea4
make entity.vector.x work properly by making relative field offset work. also don't emit a field def for the resulting immediate
...
This is an imperfect revision of history.
2004-11-12 10:49:00 +00:00
Bill Currie
fc2413ff72
more quaternion work (should be working, haven't come up with tests yet)
2004-04-08 03:32:14 +00:00
Bill Currie
385a90e8fb
correct pr_symtab_t to include the pointer to the array of selectors used
...
in the module. Unfortunatly, this requires a version bump on both qfo and
progs files due to the changes structure layout.
2003-08-23 06:15:19 +00:00
Bill Currie
b6b5089ccc
add a "nosave" flag to defs making it easier to make defs that don't get
...
saved automaticly
2003-04-25 17:00:22 +00:00
Bill Currie
19980964d7
don't create defs for the components of vector or quaternion defs
2003-04-23 19:50:16 +00:00
Bill Currie
f7d806e8d5
can now handle > vector sized parameters
2003-04-22 20:11:16 +00:00
Bill Currie
2f6fc5d80c
general revamp so params and the return value use proper defs rather than
...
hardcoded locations. this will allow use of quaternions in the future.
2003-04-22 15:29:32 +00:00
Bill Currie
1c774bc10c
remove some debug code :P
2003-03-03 21:10:29 +00:00
Bill Currie
4c5c711ff5
fix a nasty bug where immediates would get aliased. (eg, 2 and 1073741824).
2003-03-03 21:09:41 +00:00
Bill Currie
5f75aa024a
don't relocate a null function constant
2003-02-24 15:33:57 +00:00
Bill Currie
761a7546dd
re-arrange things so __attribute__ and __builtin_expect are properly
...
autoconfiscated so rcsid will continue to work with gcc 3.3
2003-01-15 15:31:36 +00:00
Bill Currie
567b905590
copyright block work
2002-10-22 14:53:18 +00:00
Bill Currie
4ee013c5ba
don't seg on null strings
2002-10-20 03:43:14 +00:00
Bill Currie
9f8d7fbca7
re-write the hashing so pointers get merged only if they point to the same
...
def
2002-10-20 03:31:49 +00:00
Bill Currie
06390e10e6
more relocs fixups. my little OO hello world progs works now :)
2002-07-14 03:41:13 +00:00
Bill Currie
0f5f68623f
it's as broken as all-get-out, but object files can now be linked
2002-07-11 22:38:23 +00:00
Bill Currie
8a402381e6
redo how progs strings are stored so multiple pools can exist
2002-07-05 20:02:10 +00:00
Bill Currie
102eab0d84
linker.[ch]:
...
start working on the linker.
class.[ch]:
redo class defs so the pointer works (needs relocs still)
obj_file.h:
add prototype for read_obj_file, QFO_* data access macros and include
pr_debug.h
type.[ch]:
separate type system initialisation and recording of the standard types
so find_type works properly in multiple compilation
def.c:
don't mark static defs as initialized
expr.c:
proper class pointer def stuff
immediate.c:
clean out dead vars/code
obj_file.c:
allocate space for the line info and bail if the file can't be opened.
qfcc.c:
register the standard types for each compile pass and start linking the
files
2002-07-03 20:16:32 +00:00
Bill Currie
8415db2d84
clear out the hash tables for compiling multiple object files
2002-06-28 16:00:01 +00:00
Bill Currie
9fee1d07dd
initial work on actually writing .qfo files. seems to work, but only test.qfo
...
is ever writtin :)
2002-06-21 20:46:56 +00:00
Bill Currie
1f67ea412d
add a global flag to def_t to make checking easier
...
rename pr.globals to pr.near_data and add pr.far_data
2002-06-10 20:54:22 +00:00
Bill Currie
1e57351be1
there, no more PR_* functions or pr_* files :)
2002-06-09 04:30:02 +00:00
Bill Currie
943c2eefb3
redo def allocation to come from configurable `spaces' (locals, globals, far
...
globals, etc).
2002-06-09 03:57:20 +00:00
Bill Currie
38d3a15413
d'oh, forgot to compile test :P
2002-06-05 19:31:43 +00:00
Bill Currie
cb395c5469
misc def improvments
2002-06-05 19:03:51 +00:00
Bill Currie
e17604f9c2
remove all arbitrary limits except for globals. they'll need a little more
...
work. Once they're done, it should take quite a big mod to crash qfcc due
to too many strings/statements/etc :)
2002-06-05 17:12:55 +00:00
Bill Currie
935f1e8c5e
prepare the string hash table for relocatable strings space and fix a bug
...
causing more string space to be allocated than necessary
2002-06-05 05:24:42 +00:00
Bill Currie
69605d0b19
even more cleanup
2002-06-04 21:23:39 +00:00
Bill Currie
06bddd3ee6
more cleanup
2002-06-04 18:44:03 +00:00