aboutsummaryrefslogtreecommitdiff
path: root/i386-gen.c
diff options
context:
space:
mode:
authorgrischka <grischka>2010-01-14 20:55:51 +0100
committergrischka <grischka>2010-01-14 20:59:42 +0100
commit2341ee5142c184e06964f66696ebf88931953e7d (patch)
tree6f858fd311ae47ec4508301e6ebf1df33bd42c8a /i386-gen.c
parentbdb9387a7494d7d5e299cb13bcc94f00215976dd (diff)
downloadtinycc-2341ee5142c184e06964f66696ebf88931953e7d.tar.gz
tinycc-2341ee5142c184e06964f66696ebf88931953e7d.tar.bz2
tccpe: improve dllimport/export and use for tcc_add_symbol
Diffstat (limited to 'i386-gen.c')
-rw-r--r--i386-gen.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/i386-gen.c b/i386-gen.c
index 9a8ceee..5ea70df 100644
--- a/i386-gen.c
+++ b/i386-gen.c
@@ -215,9 +215,10 @@ ST_FUNC void load(int r, SValue *sv)
SValue v1;
#ifdef TCC_TARGET_PE
- if (pe_dllimport(r, sv, load))
- return;
+ SValue v2;
+ sv = pe_getimport(sv, &v2);
#endif
+
fr = sv->r;
ft = sv->type.t;
fc = sv->c.ul;
@@ -283,9 +284,10 @@ ST_FUNC void store(int r, SValue *v)
int fr, bt, ft, fc;
#ifdef TCC_TARGET_PE
- if (pe_dllimport(r, v, store))
- return;
+ SValue v2;
+ v = pe_getimport(v, &v2);
#endif
+
ft = v->type.t;
fc = v->c.ul;
fr = v->r & VT_VALMASK;