diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2017-01-18 11:55:59 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2017-01-31 13:40:32 +0000 |
commit | ca402cfe7e03d1f9a8d5cb47130e37a481c9e30a (patch) | |
tree | 04e7394d76859fa508f0a6bd2b99b5fcbdc47d3d /src/qml/jit/qv4assembler_p.h | |
parent | c9916e003929a94a2abd65ee685c2b9b146fd0fc (diff) |
Correctly specialize TargetPlatform as template
Change-Id: I37d2a2d74e150b92f5a338d799def337dcb8abd9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit/qv4assembler_p.h')
-rw-r--r-- | src/qml/jit/qv4assembler_p.h | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h index ddd1463cec..308f31e97a 100644 --- a/src/qml/jit/qv4assembler_p.h +++ b/src/qml/jit/qv4assembler_p.h @@ -90,30 +90,43 @@ struct CompilationUnit : public QV4::CompiledData::CompilationUnit QVector<JSC::MacroAssemblerCodeRef> codeRefs; }; +template <typename PlatformAssembler, TargetOperatingSystemSpecialization Specialization> +struct AssemblerTargetConfiguration +{ + typedef JSC::MacroAssembler<PlatformAssembler> MacroAssembler; + typedef TargetPlatform<PlatformAssembler, Specialization> Platform; + // More things coming here in the future, such as Target OS +}; + #if CPU(ARM_THUMB2) typedef JSC::MacroAssemblerARMv7 DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #elif CPU(ARM64) typedef JSC::MacroAssemblerARM64 DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #elif CPU(ARM_TRADITIONAL) typedef JSC::MacroAssemblerARM DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #elif CPU(MIPS) typedef JSC::MacroAssemblerMIPS DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #elif CPU(X86) typedef JSC::MacroAssemblerX86 DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #elif CPU(X86_64) typedef JSC::MacroAssemblerX86_64 DefaultPlatformMacroAssembler; + +#if OS(WINDOWS) +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, WindowsSpecialization> DefaultAssemblerTargetConfiguration; +#else +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; +#endif + #elif CPU(SH4) typedef JSC::MacroAssemblerSH4 DefaultPlatformMacroAssembler; +typedef AssemblerTargetConfiguration<DefaultPlatformMacroAssembler, NoOperatingSystemSpecialization> DefaultAssemblerTargetConfiguration; #endif -template <typename PlatformAssembler> -struct AssemblerTargetConfiguration -{ - typedef JSC::MacroAssembler<PlatformAssembler> MacroAssembler; - typedef TargetPlatform<PlatformAssembler> Platform; - // More things coming here in the future, such as Target OS -}; - #define isel_stringIfyx(s) #s #define isel_stringIfy(s) isel_stringIfyx(s) |