Removing export impl.
This commit is contained in:
parent
48fbefa75e
commit
56ce363ac5
|
@ -32,7 +32,6 @@ void ExportResolver::RegisterTable(
|
||||||
exports[n].variable_ptr = 0;
|
exports[n].variable_ptr = 0;
|
||||||
exports[n].function_data.shim_data = NULL;
|
exports[n].function_data.shim_data = NULL;
|
||||||
exports[n].function_data.shim = NULL;
|
exports[n].function_data.shim = NULL;
|
||||||
exports[n].function_data.impl = NULL;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,12 +92,10 @@ void ExportResolver::SetVariableMapping(const char* library_name,
|
||||||
|
|
||||||
void ExportResolver::SetFunctionMapping(
|
void ExportResolver::SetFunctionMapping(
|
||||||
const char* library_name, const uint32_t ordinal,
|
const char* library_name, const uint32_t ordinal,
|
||||||
void* shim_data, xe_kernel_export_shim_fn shim,
|
void* shim_data, xe_kernel_export_shim_fn shim) {
|
||||||
xe_kernel_export_impl_fn impl) {
|
|
||||||
KernelExport* kernel_export = GetExportByOrdinal(library_name, ordinal);
|
KernelExport* kernel_export = GetExportByOrdinal(library_name, ordinal);
|
||||||
assert_not_null(kernel_export);
|
assert_not_null(kernel_export);
|
||||||
kernel_export->is_implemented = true;
|
kernel_export->is_implemented = true;
|
||||||
kernel_export->function_data.shim_data = shim_data;
|
kernel_export->function_data.shim_data = shim_data;
|
||||||
kernel_export->function_data.shim = shim;
|
kernel_export->function_data.shim = shim;
|
||||||
kernel_export->function_data.impl = impl;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ typedef struct xe_ppc_state xe_ppc_state_t;
|
||||||
namespace xe {
|
namespace xe {
|
||||||
|
|
||||||
|
|
||||||
typedef void (*xe_kernel_export_impl_fn)();
|
|
||||||
typedef void (*xe_kernel_export_shim_fn)(xe_ppc_state_t*, void*);
|
typedef void (*xe_kernel_export_shim_fn)(xe_ppc_state_t*, void*);
|
||||||
|
|
||||||
class KernelExport {
|
class KernelExport {
|
||||||
|
@ -52,9 +51,6 @@ public:
|
||||||
// This is called directly from generated code.
|
// This is called directly from generated code.
|
||||||
// It should parse args, do fixups, and call the impl.
|
// It should parse args, do fixups, and call the impl.
|
||||||
xe_kernel_export_shim_fn shim;
|
xe_kernel_export_shim_fn shim;
|
||||||
|
|
||||||
// Real function implementation.
|
|
||||||
xe_kernel_export_impl_fn impl;
|
|
||||||
} function_data;
|
} function_data;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -79,8 +75,7 @@ public:
|
||||||
void SetVariableMapping(const char* library_name, const uint32_t ordinal,
|
void SetVariableMapping(const char* library_name, const uint32_t ordinal,
|
||||||
uint32_t value);
|
uint32_t value);
|
||||||
void SetFunctionMapping(const char* library_name, const uint32_t ordinal,
|
void SetFunctionMapping(const char* library_name, const uint32_t ordinal,
|
||||||
void* shim_data, xe_kernel_export_shim_fn shim,
|
void* shim_data, xe_kernel_export_shim_fn shim);
|
||||||
xe_kernel_export_impl_fn impl);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
class ExportTable {
|
class ExportTable {
|
||||||
|
|
|
@ -28,8 +28,7 @@ using PPCContext = alloy::frontend::ppc::PPCContext;
|
||||||
export_resolver->SetFunctionMapping( \
|
export_resolver->SetFunctionMapping( \
|
||||||
library_name, ordinals::##export_name, \
|
library_name, ordinals::##export_name, \
|
||||||
shim_data, \
|
shim_data, \
|
||||||
(xe_kernel_export_shim_fn)export_name##_shim, \
|
(xe_kernel_export_shim_fn)export_name##_shim);
|
||||||
nullptr);
|
|
||||||
|
|
||||||
#define SHIM_MEM_BASE ppc_state->membase
|
#define SHIM_MEM_BASE ppc_state->membase
|
||||||
#define SHIM_MEM_ADDR(a) (a ? (ppc_state->membase + a) : nullptr)
|
#define SHIM_MEM_ADDR(a) (a ? (ppc_state->membase + a) : nullptr)
|
||||||
|
|
Loading…
Reference in New Issue