📄 distool.h
字号:
/* * distool.h - disassembler helper functions * Copyright (c) 1997 Advanced RISC Machines Limited. All rights reserved. *//* * RCS $Revision: 1.1 $ * Checkin $Date: 1999/03/11 11:53:38 $ * Revising $Author: rivimey $ */#include <stdio.h>#include <string.h>#include "angel.h"extern char const *hexprefix;/* ---------------- Output Functions --------------------- */#define Dis_OutC(h,o) (*o = h, o+1)#define Dis_UngetC(h,o) ((o[-1] == h) ? o-1 : o)#define Dis_OutI(n,o) Dis_OutF(o,"#%ld",n)#define Dis_OutX(n,o) Dis_OutF(o,"%s%lx",hexprefix,(unsigned long)n)/* ---------------- Bit twiddlers ------------------------ *//* The casts to unsigned32 in bit() and bits() are redundant, but required by some buggy compilers. */#define bp(n) (((unsigned32)1L<<(n)))#define bit(n) (((unsigned32)(instr & bp(n)))>>(n))#define bits(m,n) (((unsigned32)(instr & (bp(n)-bp(m)+bp(n))))>>(m))#define ror(n,b) (((unsigned32)(n)>>(b))|((n)<<(32-(b)))) /* n right rotated b bits */void Dis_AddNote(char *notes, char const *fmt, ...);void Dis_CheckValue(unsigned32 field, unsigned32 val, char const *s, char *notes);void Dis_CheckZero(unsigned32 field, char const *s, char *notes);char *Dis_OutS(char const *s, char *o);char *Dis_OutF(char *o, char const *fmt, ...);char *Dis_ArmOpCode(unsigned32 instr, const char *op, int ch, char *o);extern char *Dis_ArmOpCodeF(char *o, unsigned32 instr, const char *fmt, ...); /* fmt is of the form "<string>$<printf-format>", where $ is * where to insert the condition code */char *Dis_ArmOutAddress(unsigned32 instr, unsigned32 address, int32 offset, int w, char *o);char *Dis_ArmReg(unsigned32 rno, int ch, char *o);char *Dis_cond(unsigned32 instr, char *o);char *Dis_spacetocol9(char *start, char *o);/* End of distool.h */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -