Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VertexLoaderX64: generate PIC #2487

Merged
merged 1 commit into from Jun 3, 2015
Merged

VertexLoaderX64: generate PIC #2487

merged 1 commit into from Jun 3, 2015

Conversation

Tilka
Copy link
Member

@Tilka Tilka commented May 31, 2015

Address static memory relative to a base register, analog to what we're doing with PPCSTATE in the CPU JIT. This allows executable memory for the vertex loader JIT to be allocated anywhere, not just within 2 GiB of static data.

Fixes issue 8180.

if (memory_base <= INT32_MAX)
MOV(32, R(base_reg), Imm32((u32)memory_base));
else
MOV(64, R(base_reg), Imm64(memory_base));

This comment was marked as off-topic.

Tilka referenced this pull request in phire/dolphin May 31, 2015
Move ownership of cached_arraybases from CPMemory to VertexLoaderManager
to better match it usage.
@phire
Copy link
Member

phire commented May 31, 2015

Based on the assumption that the compiler will probably allocate cached_arraybases right in front of g_main_cp_state, move CPState.array_strides to the start of the struct. That way, if the assumption holds, we will always get s8 offsets for those two arrays.

Yeah, It's not wise to make assumptions like that. Someone could like move that variable to VertexLoaderManager...

Address static memory relative to a base register, analog to what we're
doing with PPCSTATE in the CPU JIT. This allows executable memory for
the vertex loader JIT to be allocated anywhere, not just within 2 GiB of
static data.

Fixes issue 8180.
@Tilka
Copy link
Member Author

Tilka commented Jun 3, 2015

Whether or not this fixes stuff, it's required for PIE, so let's merge it.

Tilka added a commit that referenced this pull request Jun 3, 2015
VertexLoaderX64: generate PIC
@Tilka Tilka merged commit 9f15054 into dolphin-emu:master Jun 3, 2015
@Tilka Tilka deleted the vlj_pic branch June 3, 2015 19:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants