作者: Norman Ramsey , Mary F. Fernández
关键词: Decompiler 、 Machine code 、 Specification language 、 Assembly language 、 Programming language 、 Code generation 、 Debugger 、 Object code 、 Complex instruction set computing 、 Computer science
摘要: We present SLED, a specification language for Encoding and Decoding, which describes, abstract, binary, assembly-language representations of machine instructions. Guided by SLED specification, the New Jersey Machine-Code Toolkit generates bit-manipulating code use in applications that process code. Programmers can write such at an assembly level abstraction, toolkit enables to recognize emit binary used hardware. is suitable describing both CISC RISC machines; we have specified MIPS R3000, SPARC, Alpha, Intel Pentium instructions, users written specifications Power PC Motorola 68000. The article includes representative excerpts from our SPARC specifications. uses four elements; fields tokens describe parts instructions; patterns instructions or group constructors map between abstract levels. By combining elements different ways, supports machine-independent implementations machine-level concepts like conditional assembly, span-dependent relocatable addresses, object code, sections, relocation. be checked automatically consistency with existing assemblers. implementation largely determined constructors. normal form facilitates construction encoders decoders. describes its use. has been help build several applications. built retargetable debugger retargetable, optimizing linker. Colleagues dynamic generator, decompiler, execution-time analyzer. efficient code; example, linker emits up 15% faster than it language, making 1.7-2 times produce a.out directly using assembler.