Skip to content

Commit 8f4a39a

Browse files
committed
cpu: x64: jit_generator: tidy: replace enum value
1 parent ab95569 commit 8f4a39a

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/cpu/x64/jit_generator.hpp

+3-5
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@ namespace x64 {
6363
// TODO: move this to jit_generator_t class?
6464
namespace {
6565

66-
typedef enum {
67-
MAX_CODE_SIZE = 256 * 1024,
68-
} max_code_size_t;
69-
7066
// TODO: move this somewhere else? Although this is only used by jit kernels
7167
// (Roma)
7268
inline int float2int(float x) {
@@ -2706,7 +2702,7 @@ class jit_generator_t : public Xbyak::MmapAllocator,
27062702
* the max_cpu_isa argument */
27072703
jit_generator_t(const char *name, cpu_isa_t max_cpu_isa = get_max_cpu_isa())
27082704
: Xbyak::MmapAllocator(name)
2709-
, Xbyak::CodeGenerator(MAX_CODE_SIZE, Xbyak::AutoGrow,
2705+
, Xbyak::CodeGenerator(max_code_size, Xbyak::AutoGrow,
27102706
/*allocator=*/this)
27112707
, max_cpu_isa_(max_cpu_isa) {}
27122708

@@ -2755,6 +2751,8 @@ class jit_generator_t : public Xbyak::MmapAllocator,
27552751
return Xbyak::GetError() == Xbyak::ERR_NONE;
27562752
}
27572753

2754+
static constexpr unsigned max_code_size = 256 * 1024;
2755+
27582756
protected:
27592757
virtual void generate() = 0;
27602758
const Xbyak::uint8 *jit_ker_ = nullptr;

0 commit comments

Comments
 (0)