Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
23 changes: 0 additions & 23 deletions arch/x86_64/rsp/rsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,29 +101,6 @@ cen64_align(static const uint16_t sll_l2b_keys[16][8], CACHE_LINE_SIZE) = {
{0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x0180},
};

// Shift right LUT; shifts in zeros from the left, one byte at a time.
cen64_align(static const uint16_t srl_b2l_keys[16][8], CACHE_LINE_SIZE) = {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My biggest hesitation to merging this PR is this table may be useful in the future even though it is unused now. There may be a better way to ignore the warning that this is unused.

{0x0001, 0x0203, 0x0405, 0x0607, 0x0809, 0x0A0B, 0x0C0D, 0x0E0F},
{0x0102, 0x0304, 0x0506, 0x0708, 0x090A, 0x0B0C, 0x0D0E, 0x0F80},
{0x0203, 0x0405, 0x0607, 0x0809, 0x0A0B, 0x0C0D, 0x0E0F, 0x8080},
{0x0304, 0x0506, 0x0708, 0x090A, 0x0B0C, 0x0D0E, 0x0F80, 0x8080},

{0x0405, 0x0607, 0x0809, 0x0A0B, 0x0C0D, 0x0E0F, 0x8080, 0x8080},
{0x0506, 0x0708, 0x090A, 0x0B0C, 0x0D0E, 0x0F80, 0x8080, 0x8080},
{0x0607, 0x0809, 0x0A0B, 0x0C0D, 0x0E0F, 0x8080, 0x8080, 0x8080},
{0x0708, 0x090A, 0x0B0C, 0x0D0E, 0x0F80, 0x8080, 0x8080, 0x8080},

{0x0809, 0x0A0B, 0x0C0D, 0x0E0F, 0x8080, 0x8080, 0x8080, 0x8080},
{0x090A, 0x0B0C, 0x0D0E, 0x0F80, 0x8080, 0x8080, 0x8080, 0x8080},
{0x0A0B, 0x0C0D, 0x0E0F, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},
{0x0B0C, 0x0D0E, 0x0F80, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},

{0x0C0D, 0x0E0F, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},
{0x0D0E, 0x0F80, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},
{0x0E0F, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},
{0x0F80, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080, 0x8080},
};

cen64_align(static const uint16_t ror_b2l_keys[16][8], CACHE_LINE_SIZE) = {
{0x0001, 0x0203, 0x0405, 0x0607, 0x0809, 0x0A0B, 0x0C0D, 0x0E0F},
{0x0102, 0x0304, 0x0506, 0x0708, 0x090A, 0x0B0C, 0x0D0E, 0x0F00},
Expand Down
4 changes: 0 additions & 4 deletions arch/x86_64/rsp/transpose.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "rsp/rsp.h"

void rsp_ltv(struct rsp *rsp, uint32_t addr, unsigned element, unsigned vt) {
struct rsp_exdf_latch *exdf_latch = &rsp->pipeline.exdf_latch;

for(int i = 0; i < 8; i++){
uint16_t slice;

Expand All @@ -23,8 +21,6 @@ void rsp_ltv(struct rsp *rsp, uint32_t addr, unsigned element, unsigned vt) {
}

void rsp_stv(struct rsp *rsp, uint32_t addr, unsigned element, unsigned vt) {
struct rsp_exdf_latch *exdf_latch = &rsp->pipeline.exdf_latch;

for(int i = 0; i < 8; i++){
uint16_t slice = rsp->cp2.regs[vt + ((i + element) & 7)].e[i];
slice = byteswap_16(slice);
Expand Down
2 changes: 1 addition & 1 deletion bus/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ int bus_init(struct bus_controller *bus, int dd_present) {
static const struct bus_controller_mapping mappings[NUM_MAPPINGS] = {
{read_ai_regs, write_ai_regs, AI_REGS_BASE_ADDRESS, AI_REGS_ADDRESS_LEN},
{read_dp_regs, write_dp_regs, DP_REGS_BASE_ADDRESS, DP_REGS_ADDRESS_LEN},
{read_mi_regs, write_mi_regs, MI_REGS_BASE_ADDRESS, MI_REGS_ADDRESS_LEN},
{(memory_rd_function)read_mi_regs, (memory_wr_function)write_mi_regs, MI_REGS_BASE_ADDRESS, MI_REGS_ADDRESS_LEN},
{read_pi_regs, write_pi_regs, PI_REGS_BASE_ADDRESS, PI_REGS_ADDRESS_LEN},
{read_ri_regs, write_ri_regs, RI_REGS_BASE_ADDRESS, RI_REGS_ADDRESS_LEN},
{read_si_regs, write_si_regs, SI_REGS_BASE_ADDRESS, SI_REGS_ADDRESS_LEN},
Expand Down
2 changes: 1 addition & 1 deletion cen64.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ int run_device(struct cen64_device *device, bool no_video) {
return 1;
}

cen64_thread_setname(thread, "device");
cen64_thread_setname(&thread, "device");

if (!no_video)
cen64_gl_window_thread(device);
Expand Down
2 changes: 1 addition & 1 deletion device/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ int device_multithread_spin(struct cen64_device *device) {
}


cen64_thread_setname(vr4300_thread, "vr4300");
cen64_thread_setname(&vr4300_thread, "vr4300");

run_rcp_thread(device);

Expand Down
4 changes: 1 addition & 3 deletions os/x11/gl_window.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,7 @@ int cen64_gl_window_thread(struct cen64_device *device) {
//}

// Did we get a UI event?
if (FD_ISSET(vi->window->pipefds[0], &ready_to_read)) {
read(vi->window->pipefds[0], &window, sizeof(window));

if (FD_ISSET(vi->window->pipefds[0], &ready_to_read) && read(vi->window->pipefds[0], &window, sizeof(window)) > 0) {
cen64_mutex_lock(&window->render_mutex);

gl_window_render_frame(vi, window->frame_buffer,
Expand Down
2 changes: 1 addition & 1 deletion os/x11/gl_window.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ static inline void cen64_gl_window_destroy(cen64_gl_window window) {

// Pushes a notification to the UI queue to indicate a frame is ready.
static inline void cen64_gl_window_push_frame(cen64_gl_window window) {
write(window->pipefds[1], &window, sizeof(window));
(void)!write(window->pipefds[1], &window, sizeof(window));
}

// Sets the title of the cen64_gl_window.
Expand Down
Loading