1 #/bin/emblua LUAPREFIX=/*|
7 /*| function pred_ipairs(t, pred)
8 /*| return function(t,k)
13 /*| until not v or pred(k, v)
17 /*| function isa(v) return not v[N==32 and "x64" or "x32only"] end
18 /*| function isaN(k,v) return not v[N==32 and "x64" or "x32"] end
19 #ifndef _JITCS_TESTS_TESTASM_X86_%(N)_H_
20 #define _JITCS_TESTS_TESTASM_X86_%(N)_H_
23 #include "jitcs_x86_%(N).h"
25 struct TestAssemblerX86_%(N) : public TestAssembler {
26 TestAssemblerX86_%(N)(jitcs::RefCounter<jitcs::MemoryMgr> m,
27 jitcs::RefCounter<jitcs::TempAllocator> a,
28 jitcs::RefCounter<jitcs::IMachineInfo> mi);
30 virtual void setupInstructionNames(std::map<std::string, jitcs::u32>&);
31 virtual void setupRegisterClassNames(std::map<std::string, jitcs::u32>&);
32 virtual void setupFixedRegisterNames(std::map<std::string, const jitcs::VirtualRegister*>&);
34 virtual const char* addInstruction(jitcs::u32 insid, std::vector<std::string> const& parms);
36 bool makeGR8Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
37 bool makeGR16Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
38 bool makeGR32Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
40 bool makeGR64Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
42 bool makeGRRef(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
43 bool makeVR128Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
44 bool makeVR256Ref(jitcs::RefOrNull<const jitcs::VirtualRegister>&, std::string const&);
45 bool makeMemRef(jitcs::RefOrNull<jitcs::MemoryReference>&, std::string const&);
46 bool makeBBRef(jitcs::RefOrNull<jitcs::BasicBlock>&, std::string const&);
47 bool makei8(jitcs::i8&, std::string const&);
48 bool makei16(jitcs::i16&, std::string const&);
49 bool makei32(jitcs::i32&, std::string const&);
50 bool makei64(jitcs::i64&, std::string const&);
54 // _JITCS_TESTS_TESTASM_X86_32_H_