Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

expose dwarf_regno as a platform specific function #1776

Merged
merged 1 commit into from

4 participants

@braddr
Owner

No description provided.

@MartinNowak
Collaborator

Why is it needed?

@braddr
Owner

It's part of the work I've been doing over the last year or so to split the backend into generic vs platform specific parts. That code is specific to x86's register mapping.

@alexrp

LGTM.

@WalterBright WalterBright merged commit 60733bc into D-Programming-Language:master
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
@ghost Unknown referenced this pull request from a commit
Commit has since been removed from the repository and is no longer available.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 21, 2013
  1. @braddr
This page is out of date. Refresh to see the latest.
View
2  src/backend/dwarf.c
@@ -149,6 +149,7 @@ struct CFA_state
CFA_reg regstates[17]; // register states
};
+#if TX86
int dwarf_regno(int reg)
{
assert(reg < NUMGENREGS);
@@ -162,6 +163,7 @@ int dwarf_regno(int reg)
return reg < 8 ? to_amd64_reg_map[reg] : reg;
}
}
+#endif
static CFA_state CFA_state_init_32 = // initial CFA state as defined by CIE
{ 0, // location
View
2  src/backend/dwarf.h
@@ -15,4 +15,6 @@ void dwarf_func_term(Symbol *sfunc);
unsigned dwarf_typidx(type *t);
unsigned dwarf_abbrev_code(unsigned char *data, size_t nbytes);
+int dwarf_regno(int reg);
+
#endif
View
2  src/backend/platform_stub.c
@@ -40,6 +40,8 @@ code* REGSAVE::save(code* c, int reg, unsigned* pidx) { assert(0); return NULL;
FuncParamRegs::FuncParamRegs(tym_t tyf) { assert(0); }
int FuncParamRegs::alloc(type *t, tym_t ty, unsigned char *preg1, unsigned char *preg2) { assert(0); return 0; }
+int dwarf_regno(int reg) { assert(0); return 0; }
+
code* prolog_ifunc(tym_t* tyf) { assert(0); return NULL; }
code* prolog_ifunc2(tym_t tyf, tym_t tym, bool pushds) { assert(0); return NULL; }
code* prolog_16bit_windows_farfunc(tym_t* tyf, bool* pushds) { assert(0); return NULL; }
Something went wrong with that request. Please try again.