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

Remove target/riscv/asm.h #1206

Merged
merged 1 commit into from
Jan 27, 2025
Merged
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
1 change: 0 additions & 1 deletion src/target/riscv/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

noinst_LTLIBRARIES += %D%/libriscv.la
%C%_libriscv_la_SOURCES = \
%D%/asm.h \
%D%/batch.h \
%D%/debug_defines.h \
%D%/debug_reg_printer.h \
Expand Down
40 changes: 0 additions & 40 deletions src/target/riscv/asm.h

This file was deleted.

1 change: 0 additions & 1 deletion src/target/riscv/program.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#include "program.h"
#include "helper/log.h"

#include "asm.h"
#include "debug_defines.h"
#include "encoding.h"

Expand Down
27 changes: 26 additions & 1 deletion src/target/riscv/riscv-011.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "riscv.h"
#include "riscv_reg.h"
#include "riscv-011_reg.h"
#include "asm.h"
#include "gdb_regs.h"
#include "field_helpers.h"

Expand Down Expand Up @@ -251,6 +250,32 @@ static unsigned int slot_offset(const struct target *target, slot_t slot)
return 0; /* Silence -Werror=return-type */
}

static uint32_t load(const struct target *target, unsigned int rd,
unsigned int base, uint16_t offset)
{
switch (riscv_xlen(target)) {
case 32:
return lw(rd, base, offset);
case 64:
return ld(rd, base, offset);
}
assert(0);
return 0; /* Silence -Werror=return-type */
}

static uint32_t store(const struct target *target, unsigned int src,
unsigned int base, uint16_t offset)
{
switch (riscv_xlen(target)) {
case 32:
return sw(src, base, offset);
case 64:
return sd(src, base, offset);
}
assert(0);
return 0; /* Silence -Werror=return-type */
}

static uint32_t load_slot(const struct target *target, unsigned int dest,
slot_t slot)
{
Expand Down
1 change: 0 additions & 1 deletion src/target/riscv/riscv-013.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "debug_defines.h"
#include "rtos/rtos.h"
#include "program.h"
#include "asm.h"
#include "batch.h"
#include "debug_reg_printer.h"
#include "field_helpers.h"
Expand Down
Loading