elfload.c (e016b58f6ed2e07bde45da7d6792b6c93879a3cf) elfload.c (e91a7227cb802ea62ffa14707ebc2f588b01213d)
1/* This is the Linux kernel elf-loading code, ported into user space */
2#include "qemu/osdep.h"
3#include <sys/param.h>
4
5#include <sys/resource.h>
6#include <sys/shm.h>
7
8#include "qemu.h"

--- 1434 unchanged lines hidden (view full) ---

1443
1444static uint32_t get_elf_hwcap(void)
1445{
1446#define MISA_BIT(EXT) (1 << (EXT - 'A'))
1447 RISCVCPU *cpu = RISCV_CPU(thread_cpu);
1448 uint32_t mask = MISA_BIT('I') | MISA_BIT('M') | MISA_BIT('A')
1449 | MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C');
1450
1/* This is the Linux kernel elf-loading code, ported into user space */
2#include "qemu/osdep.h"
3#include <sys/param.h>
4
5#include <sys/resource.h>
6#include <sys/shm.h>
7
8#include "qemu.h"

--- 1434 unchanged lines hidden (view full) ---

1443
1444static uint32_t get_elf_hwcap(void)
1445{
1446#define MISA_BIT(EXT) (1 << (EXT - 'A'))
1447 RISCVCPU *cpu = RISCV_CPU(thread_cpu);
1448 uint32_t mask = MISA_BIT('I') | MISA_BIT('M') | MISA_BIT('A')
1449 | MISA_BIT('F') | MISA_BIT('D') | MISA_BIT('C');
1450
1451 return cpu->env.misa & mask;
1451 return cpu->env.misa_ext & mask;
1452#undef MISA_BIT
1453}
1454
1455static inline void init_thread(struct target_pt_regs *regs,
1456 struct image_info *infop)
1457{
1458 regs->sepc = infop->entry;
1459 regs->sp = infop->start_stack;

--- 2677 unchanged lines hidden ---
1452#undef MISA_BIT
1453}
1454
1455static inline void init_thread(struct target_pt_regs *regs,
1456 struct image_info *infop)
1457{
1458 regs->sepc = infop->entry;
1459 regs->sp = infop->start_stack;

--- 2677 unchanged lines hidden ---