BitFunnel / NativeJIT

A C++ expression -> x64 JIT
http://bitfunnel.org/
MIT License
1.14k stars 83 forks source link

Use constexpr for register constants #31

Open danluu opened 8 years ago

danluu commented 8 years ago

inc/NativeJIT/Nodes/ParameterNode.h

        // Integer parameters are passed in RCX, RDX, R8, and R9.
        // Use constants to encode registers. See #31.
#ifdef NATIVEJIT_PLATFORM_WINDOWS
        const uint8_t idMap[] = {1, 2, 8, 9};
#else
        const uint8_t idMap[] = {7, 6, 2, 1, 8, 9};
#endif

See also #24