8000 move emu to mod and fix rep vs repe and fix adc/add8 by brandonros · Pull Request #73 · sha0coder/libscemu · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 27, 2024. It is now read-only.

move emu to mod and fix rep vs repe and fix adc/add8 #73

Merged
merged 11 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
brandonros committed Dec 26, 2024
commit 1c06b4de7886c4f5f6e43bb3839ed606816abfcb
1 change: 0 additions & 1 deletion src/emu/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ pub const LIBS32_MAX: u64 = 0x7FFFFFFF;
pub const LIBS64_MIN: u64 = 0x7FF000000000;
pub const LIBS64_MAX: u64 = 0x7FFFFFFFFFFF;


pub const STATUS_SUCCESS: u64 = 0x00000000;
pub const STATUS_ACCESS_DENIED: u64 = 0xC0000022;
pub const STATUS_INVALID_HANDLE: u64 = 0xC0000008;
Expand Down
9 changes: 1 addition & 8 deletions src/emu/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,6 @@ impl Emu {

// base is setted by image base (if overlapps, alloc)
} else {

// user's program
if set_entry {
if pe64.opt.image_base >= constants::LIBS64_MIN as u64 {
Expand Down Expand Up @@ -3312,7 +3311,7 @@ impl Emu {
}
} else {
if self.seh == 0 {
log::info!("exception without any SEH handler nor vector configured.");
log::info!("exception without any SEH handler nor vector configured. pos = {}", self.pos);
if self.cfg.console_enabled {
self.spawn_console();
}
Expand Down Expand Up @@ -5138,9 +5137,6 @@ impl Emu {
None => return false,
};

let in_rflags = self.flags.clone();
log::info!("DEBUG: in: adc value0: 0x{:x}, value1: 0x{:x}, cf: 0x{:x}, rflags: 0x{:x}", value0, value1, cf, in_rflags.dump());

let res = match self.get_operand_sz(&ins, 1) {
64 => self.flags.add64(value0, value1, self.flags.f_cf, true),
32 => self.flags.add32((value0 & 0xffffffff) as u32, (value1 & 0xffffffff) as u32, self.flags.f_cf, true),
Expand All @@ -5149,9 +5145,6 @@ impl Emu {
_ => unreachable!("weird size"),
};

let out_rflags = self.flags.clone();
log::info!("DEBUG: out: adc res: 0x{:x}, rflags: 0x{:x} diff: {}", res, out_rflags.dump(), Flags::diff(in_rflags, out_rflags));

if !self.set_operand_value(&ins, 0, res) {
return false;
}
Expand Down
0