Skip to content
Merged
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
12 changes: 12 additions & 0 deletions target/hexagon/hexswi.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

/* non-arm-compatible semihosting calls */
#define HEXAGON_SPECIFIC_SWI_FLAGS \
DEF_SWI_FLAG(SEEK, 0x0A) \
DEF_SWI_FLAG(EXCEPTION, 0x18) \
DEF_SWI_FLAG(READ_CYCLES, 0x40) \
DEF_SWI_FLAG(PROF_ON, 0x41) \
Expand Down Expand Up @@ -325,6 +326,17 @@ static void sim_handle_trap0(CPUHexagonState *env)
semi_cb(cs, 0, 0);
break;

case HEX_SYS_SEEK:
{
int fd;
target_ulong off;
hexagon_read_memory(env, swi_info, 4, &fd, retaddr);
hexagon_read_memory(env, swi_info + 4, 4, &off, retaddr);
semihost_sys_lseek(env_cpu(env), common_semi_ftell_cb, fd, off,
GDB_SEEK_SET);
}
break;

case HEX_SYS_STAT:
case HEX_SYS_FSTAT:
{
Expand Down