mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-04-22 04:25:19 +00:00
sys_spu: fix spu image loading address calculation
by calculating mem_size after nsegs has being calculated
This commit is contained in:
parent
3066a05df0
commit
fad9cd6ef1
1 changed files with 2 additions and 2 deletions
|
@ -43,11 +43,11 @@ void sys_spu_image::load(const fs::file& stream)
|
|||
}
|
||||
}
|
||||
|
||||
const u32 mem_size = nsegs * sizeof(sys_spu_segment) + ::size32(stream);
|
||||
|
||||
type = SYS_SPU_IMAGE_TYPE_KERNEL;
|
||||
entry_point = obj.header.e_entry;
|
||||
nsegs = sys_spu_image::get_nsegs(obj.progs);
|
||||
|
||||
const u32 mem_size = nsegs * sizeof(sys_spu_segment) + ::size32(stream);
|
||||
segs = vm::cast(vm::alloc(mem_size, vm::main));
|
||||
|
||||
const u32 src = segs.addr() + nsegs * sizeof(sys_spu_segment);
|
||||
|
|
Loading…
Add table
Reference in a new issue