mirror of
https://github.com/n64dev/cen64.git
synced 2024-06-22 22:12:45 -04:00
Remove unused cen64_context_* calls.
Originally these functions were intended to workaround problems experienced by RSP vector register caching, but we don't use it anymore so we can just nix them. Fixes #41
This commit is contained in:
parent
406b080fd1
commit
51b83257f7
|
@ -56,11 +56,6 @@ if (${CMAKE_C_COMPILER_ID} MATCHES GNU)
|
|||
|
||||
set(CEN64_ARCH_DIR "x86_64")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/os/unix/x86_64)
|
||||
|
||||
if (NOT APPLE)
|
||||
set(ASM_SOURCES ${PROJECT_SOURCE_DIR}/arch/x86_64/gcc/context.s)
|
||||
endif ()
|
||||
# file(GLOB ASM_SOURCES ${PROJECT_SOURCE_DIR}/arch/x86_64/rsp/gcc/*.s)
|
||||
endif (${GCC_MACHINE} MATCHES "x86.*" OR ${GCC_MACHINE} MATCHES "i.86.*")
|
||||
|
||||
if (${GCC_MACHINE} STREQUAL "arm")
|
||||
|
@ -139,11 +134,6 @@ if (${CMAKE_C_COMPILER_ID} MATCHES Clang)
|
|||
|
||||
set(CEN64_ARCH_DIR "x86_64")
|
||||
include_directories(${PROJECT_SOURCE_DIR}/os/unix/x86_64)
|
||||
|
||||
if (NOT APPLE)
|
||||
set(ASM_SOURCES ${PROJECT_SOURCE_DIR}/arch/x86_64/gcc/context.s)
|
||||
endif ()
|
||||
# file(GLOB ASM_SOURCES ${PROJECT_SOURCE_DIR}/arch/x86_64/rsp/gcc/*.s)
|
||||
endif (${CLANG_MACHINE} MATCHES "x86.*" OR ${CLANG_MACHINE} MATCHES "i.86.*")
|
||||
|
||||
if (${CLANG_MACHINE} STREQUAL "arm")
|
||||
|
@ -254,11 +244,6 @@ set(ARCH_X86_64_SOURCES
|
|||
${PROJECT_SOURCE_DIR}/arch/x86_64/rsp/vrsq.c
|
||||
)
|
||||
|
||||
if (NOT APPLE)
|
||||
list(APPEND ARCH_X86_64_SOURCES
|
||||
${PROJECT_SOURCE_DIR}/arch/x86_64/gcc/context.s)
|
||||
endif ()
|
||||
|
||||
set(BUS_SOURCES
|
||||
${PROJECT_SOURCE_DIR}/bus/controller.c
|
||||
${PROJECT_SOURCE_DIR}/bus/memorymap.c
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
//
|
||||
|
||||
#include "common/debug.h"
|
||||
#include "context.h"
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
#include <stdio.h>
|
||||
|
@ -17,23 +16,13 @@
|
|||
|
||||
// Writes a formatted string to standard output.
|
||||
int debug(const char *fmt, ...) {
|
||||
#ifndef __APPLE__
|
||||
struct cen64_context c;
|
||||
#endif
|
||||
va_list ap;
|
||||
int ret;
|
||||
|
||||
#ifndef __APPLE__
|
||||
cen64_context_save(&c);
|
||||
#endif
|
||||
|
||||
va_start(ap, fmt);
|
||||
ret = vfprintf(stdout, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
#ifndef __APPLE__
|
||||
cen64_context_restore(&c);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,9 +56,6 @@ int read_vi_regs(void *opaque, uint32_t address, uint32_t *word) {
|
|||
|
||||
// Advances the controller by one clock cycle.
|
||||
void vi_cycle(struct vi_controller *vi) {
|
||||
#ifndef __APPLE__
|
||||
struct cen64_context c;
|
||||
#endif
|
||||
cen64_gl_window window;
|
||||
size_t copy_size;
|
||||
|
||||
|
@ -69,9 +66,6 @@ void vi_cycle(struct vi_controller *vi) {
|
|||
if (likely(vi->counter-- != 0))
|
||||
return;
|
||||
|
||||
#ifndef __APPLE__
|
||||
cen64_context_save(&c);
|
||||
#endif
|
||||
window = vi->window;
|
||||
|
||||
// Calculate the bounding positions.
|
||||
|
@ -134,10 +128,6 @@ void vi_cycle(struct vi_controller *vi) {
|
|||
// Raise an interrupt to indicate refresh.
|
||||
signal_rcp_interrupt(vi->bus->vr4300, MI_INTR_VI);
|
||||
vi->counter = VI_COUNTER_START;
|
||||
|
||||
#ifndef __APPLE__
|
||||
cen64_context_restore(&c);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Initializes the VI.
|
||||
|
|
Loading…
Reference in a new issue