History

OpenBSD: improve partial support for x86_64 - WIP

Christian Jullien committed 5 years ago

Commit 4e12c2a1 parent cf8d9cf3 files · +8 −0Browse files

Unified · Split

3 files
  1. tcc.c +2 −0
  2. tcc.h +3 −0
  3. tccrun.c +3 −0
tcc.c+2−0
@@ -171,6 +171,8 @@ static const char version[] = · 170 unmodified lines
171171 " Darwin"
172172 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
173173 " FreeBSD"
174+#elif defined(__OpenBSD__)
175+ " OpenBSD"
174176 #else
175177 " Linux"
176178 #endif
tcc.h+3−0
@@ -45,6 +45,9 @@ · 44 unmodified lines
4545 /* XXX: need to define this to use them in non ISOC99 context */
4646 extern float strtof (const char *__nptr, char **__endptr);
4747 extern long double strtold (const char *__nptr, char **__endptr);
48+# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
49+extern char **environ;
50+# endif
4851 #endif
4952
5053 #ifdef _WIN32
tccrun.c+3−0
@@ -648,6 +648,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) · 647 unmodified lines
648648 # elif defined(__NetBSD__)
649649 rc->ip = uc->uc_mcontext.__gregs[_REG_RIP];
650650 rc->fp = uc->uc_mcontext.__gregs[_REG_RBP];
651+# elif defined(__OpenBSD__)
652+ rc->ip = uc->sc_rip;
653+ rc->fp = uc->sc_rbp;
651654 # else
652655 rc->ip = uc->uc_mcontext.gregs[REG_RIP];
653656 rc->fp = uc->uc_mcontext.gregs[REG_RBP];

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t