OXIESEC PANEL
- Current Dir:
/
/
usr
/
src
/
linux-headers-4.15.0-213
/
arch
/
arc
/
include
/
asm
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 07:14:12 AM
rwxr-xr-x
📄
Kbuild
681 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
arcregs.h
8.59 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
asm-offsets.h
311 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
atomic.h
15.14 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
barrier.h
1.75 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
bitops.h
9.81 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
bug.h
938 bytes
06/16/2023 05:32:39 PM
rw-r--r--
📄
cache.h
3.77 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
cacheflush.h
3.88 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
checksum.h
2.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
cmpxchg.h
5.4 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
current.h
695 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
delay.h
1.99 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
disasm.h
3.87 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma-mapping.h
734 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dma.h
459 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
dwarf.h
892 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
elf.h
2.15 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
entry-arcv2.h
4.85 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
entry-compact.h
9.29 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
entry.h
6.73 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
exec.h
410 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
fb.h
411 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
futex.h
3.67 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
highmem.h
1.46 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
hugepage.h
2.41 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
io.h
6.43 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
irq.h
825 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags-arcv2.h
3.45 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags-compact.h
4.25 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
irqflags.h
509 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kdebug.h
400 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kgdb.h
1.35 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
kmap_types.h
489 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
kprobes.h
1.37 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
linkage.h
1.42 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
mach_desc.h
2.06 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
mmu.h
2.44 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmu_context.h
5.67 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
mmzone.h
989 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
module.h
661 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
page.h
2.99 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
pci.h
705 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
perf_event.h
6.86 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
pgalloc.h
3.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
pgtable.h
14.2 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
processor.h
4.69 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
ptrace.h
3.87 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
sections.h
407 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
segment.h
612 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
serial.h
644 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
setup.h
1.18 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
shmparam.h
442 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
smp.h
4.25 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock.h
8.79 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
spinlock_types.h
1.03 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
stacktrace.h
1.29 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
string.h
1.15 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
switch_to.h
1.17 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscall.h
1.57 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
syscalls.h
653 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
thread_info.h
3.39 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
timex.h
508 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlb-mmu1.h
3.48 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlb.h
1.23 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
tlbflush.h
1.76 KB
01/28/2018 09:20:33 PM
rw-r--r--
📄
uaccess.h
18.45 KB
06/16/2023 05:32:39 PM
rw-r--r--
📄
unaligned.h
771 bytes
01/28/2018 09:20:33 PM
rw-r--r--
📄
unwind.h
3.51 KB
01/28/2018 09:20:33 PM
rw-r--r--
Editing: disasm.h
Close
/* * several functions that help interpret ARC instructions * used for unaligned accesses, kprobes and kgdb * * Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #ifndef __ARC_DISASM_H__ #define __ARC_DISASM_H__ enum { op_Bcc = 0, op_BLcc = 1, op_LD = 2, op_ST = 3, op_MAJOR_4 = 4, op_MAJOR_5 = 5, op_LD_ADD = 12, op_ADD_SUB_SHIFT = 13, op_ADD_MOV_CMP = 14, op_S = 15, op_LD_S = 16, op_LDB_S = 17, op_LDW_S = 18, op_LDWX_S = 19, op_ST_S = 20, op_STB_S = 21, op_STW_S = 22, op_Su5 = 23, op_SP = 24, op_GP = 25, op_Pcl = 26, op_MOV_S = 27, op_ADD_CMP = 28, op_BR_S = 29, op_B_S = 30, op_BL_S = 31 }; enum flow { noflow, direct_jump, direct_call, indirect_jump, indirect_call, invalid_instr }; #define IS_BIT(word, n) ((word) & (1<<n)) #define BITS(word, s, e) (((word) >> (s)) & (~((-2) << ((e) - (s))))) #define MAJOR_OPCODE(word) (BITS((word), 27, 31)) #define MINOR_OPCODE(word) (BITS((word), 16, 21)) #define FIELD_A(word) (BITS((word), 0, 5)) #define FIELD_B(word) ((BITS((word), 12, 14)<<3) | \ (BITS((word), 24, 26))) #define FIELD_C(word) (BITS((word), 6, 11)) #define FIELD_u6(word) FIELDC(word) #define FIELD_s12(word) sign_extend(((BITS((word), 0, 5) << 6) | \ BITS((word), 6, 11)), 12) /* note that for BL/BRcc these two macro's need another AND statement to mask * out bit 1 (make the result a multiple of 4) */ #define FIELD_s9(word) sign_extend(((BITS(word, 15, 15) << 8) | \ BITS(word, 16, 23)), 9) #define FIELD_s21(word) sign_extend(((BITS(word, 6, 15) << 11) | \ (BITS(word, 17, 26) << 1)), 12) #define FIELD_s25(word) sign_extend(((BITS(word, 0, 3) << 21) | \ (BITS(word, 6, 15) << 11) | \ (BITS(word, 17, 26) << 1)), 12) /* note: these operate on 16 bits! */ #define FIELD_S_A(word) ((BITS((word), 2, 2)<<3) | BITS((word), 0, 2)) #define FIELD_S_B(word) ((BITS((word), 10, 10)<<3) | \ BITS((word), 8, 10)) #define FIELD_S_C(word) ((BITS((word), 7, 7)<<3) | BITS((word), 5, 7)) #define FIELD_S_H(word) ((BITS((word), 0, 2)<<3) | BITS((word), 5, 8)) #define FIELD_S_u5(word) (BITS((word), 0, 4)) #define FIELD_S_u6(word) (BITS((word), 0, 4) << 1) #define FIELD_S_u7(word) (BITS((word), 0, 4) << 2) #define FIELD_S_u10(word) (BITS((word), 0, 7) << 2) #define FIELD_S_s7(word) sign_extend(BITS((word), 0, 5) << 1, 9) #define FIELD_S_s8(word) sign_extend(BITS((word), 0, 7) << 1, 9) #define FIELD_S_s9(word) sign_extend(BITS((word), 0, 8), 9) #define FIELD_S_s10(word) sign_extend(BITS((word), 0, 8) << 1, 10) #define FIELD_S_s11(word) sign_extend(BITS((word), 0, 8) << 2, 11) #define FIELD_S_s13(word) sign_extend(BITS((word), 0, 10) << 2, 13) #define STATUS32_L 0x00000100 #define REG_LIMM 62 struct disasm_state { /* generic info */ unsigned long words[2]; int instr_len; int major_opcode; /* info for branch/jump */ int is_branch; int target; int delay_slot; enum flow flow; /* info for load/store */ int src1, src2, src3, dest, wb_reg; int zz, aa, x, pref, di; int fault, write; }; static inline int sign_extend(int value, int bits) { if (IS_BIT(value, (bits - 1))) value |= (0xffffffff << bits); return value; } static inline int is_short_instr(unsigned long addr) { uint16_t word = *((uint16_t *)addr); int opcode = (word >> 11) & 0x1F; return (opcode >= 0x0B); } void disasm_instr(unsigned long addr, struct disasm_state *state, int userspace, struct pt_regs *regs, struct callee_regs *cregs); int disasm_next_pc(unsigned long pc, struct pt_regs *regs, struct callee_regs *cregs, unsigned long *fall_thru, unsigned long *target); long get_reg(int reg, struct pt_regs *regs, struct callee_regs *cregs); void set_reg(int reg, long val, struct pt_regs *regs, struct callee_regs *cregs); #endif /* __ARC_DISASM_H__ */