Fixing VC++ warnings and errors.

This commit is contained in:
Ben Vanik
2013-02-08 22:07:38 -08:00
parent c1e2119db4
commit 338b890ef5
26 changed files with 147 additions and 58 deletions

View File

@@ -623,7 +623,7 @@ void FunctionGenerator::FillRegisters() {
for (size_t n = 0; n < XECOUNT(locals_.gpr); n++) {
if (locals_.gpr[n]) {
b.CreateStore(LoadStateValue(
offsetof(xe_ppc_state_t, r) + 8 * n,
(uint32_t)offsetof(xe_ppc_state_t, r) + 8 * n,
b.getInt64Ty()), locals_.gpr[n]);
}
}
@@ -631,7 +631,7 @@ void FunctionGenerator::FillRegisters() {
for (size_t n = 0; n < XECOUNT(locals_.fpr); n++) {
if (locals_.fpr[n]) {
b.CreateStore(LoadStateValue(
offsetof(xe_ppc_state_t, f) + 8 * n,
(uint32_t)offsetof(xe_ppc_state_t, f) + 8 * n,
b.getDoubleTy()), locals_.fpr[n]);
}
}

View File

@@ -141,7 +141,8 @@ int Processor::LoadBinary(const xechar_t* path, uint32_t start_address,
exec_module = new ExecModule(
memory_, export_resolver, name_a, path_a, engine_);
if (exec_module->PrepareRawBinary(start_address, start_address + length)) {
if (exec_module->PrepareRawBinary(start_address,
start_address + (uint32_t)length)) {
delete exec_module;
return 1;
}

View File

@@ -209,7 +209,7 @@ int SymbolDatabase::AnalyzeFunction(FunctionSymbol* fn) {
// Function starts with 0x00000000 - we want to skip this and split.
symbols_.erase(fn->start_address);
// Scan ahead until the first non-zero or the end of the valid range.
size_t next_addr = fn->start_address + 4;
uint32_t next_addr = fn->start_address + 4;
while (true) {
if (!IsValueInTextRange(next_addr)) {
// Ran out of the range. Abort.

View File

@@ -42,8 +42,8 @@ typedef struct IMAGE_XBOX_RUNTIME_FUNCTION_ENTRY_t {
class PEMethodInfo {
public:
uint32_t address;
size_t total_length; // in bytes
size_t prolog_length; // in bytes
uint32_t total_length; // in bytes
uint32_t prolog_length; // in bytes
};