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
171 " Darwin"171 " Darwin"
172#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)172#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
173 " FreeBSD"173 " FreeBSD"
174#elif defined(__OpenBSD__)
175 " OpenBSD"
174#else176#else
175 " Linux"177 " Linux"
176#endif178#endif
tcc.h+3−0
@@ -45,6 +45,9 @@ · 44 unmodified lines
45/* XXX: need to define this to use them in non ISOC99 context */45/* XXX: need to define this to use them in non ISOC99 context */
46extern float strtof (const char *__nptr, char **__endptr);46extern float strtof (const char *__nptr, char **__endptr);
47extern long double strtold (const char *__nptr, char **__endptr);47extern long double strtold (const char *__nptr, char **__endptr);
48# if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
49extern char **environ;
50# endif
48#endif51#endif
49 52
50#ifdef _WIN3253#ifdef _WIN32
tccrun.c+3−0
@@ -648,6 +648,9 @@ static void rt_getcontext(ucontext_t *uc, rt_context *rc) · 647 unmodified lines
648# elif defined(__NetBSD__)648# elif defined(__NetBSD__)
649 rc->ip = uc->uc_mcontext.__gregs[_REG_RIP];649 rc->ip = uc->uc_mcontext.__gregs[_REG_RIP];
650 rc->fp = uc->uc_mcontext.__gregs[_REG_RBP];650 rc->fp = uc->uc_mcontext.__gregs[_REG_RBP];
651# elif defined(__OpenBSD__)
652 rc->ip = uc->sc_rip;
653 rc->fp = uc->sc_rbp;
651# else654# else
652 rc->ip = uc->uc_mcontext.gregs[REG_RIP];655 rc->ip = uc->uc_mcontext.gregs[REG_RIP];
653 rc->fp = uc->uc_mcontext.gregs[REG_RBP];656 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