Skip to content

Commit

Permalink
Removed contribs
Browse files Browse the repository at this point in the history
Added some misc methods to Compiler.
Moved reset() from X86Var to Var.
  • Loading branch information
kobalicek committed Sep 17, 2014
1 parent 66a863c commit eef8f78
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 190 deletions.
11 changes: 0 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ CMake_Minimum_Required(VERSION 2.8.12)
# Whether to build static library (default FALSE).
# Set(ASMJIT_STATIC FALSE)

# Whether to build contribution together with AsmJit (default FALSE)
# Set(ASMJIT_BUILD_CONTRIB)

# Whether to build tests (default FALSE).
# Set(ASMJIT_BUILD_TEST FALSE)

Expand Down Expand Up @@ -227,7 +224,6 @@ AsmJit_AddSource(ASMJIT_SRC asmjit
base.h
build.h
config.h
contrib.h
host.h
x86.h
)
Expand Down Expand Up @@ -289,13 +285,6 @@ AsmJit_AddSource(ASMJIT_SRC asmjit/x86
x86scheduler_p.h
)

If(ASMJIT_BUILD_CONTRIB)
AsmJit_AddSource(ASMJIT_SRC asmjit/contrib
winremoteruntime.cpp
winremoteruntime.h
)
EndIf()

# =============================================================================
# [AsmJit - Headers]
# =============================================================================
Expand Down
46 changes: 44 additions & 2 deletions src/asmjit/base/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,6 +558,12 @@ struct Var : public Operand {
return Var(*this);
}

//! Reset Var operand.
ASMJIT_INLINE void reset() {
_init_packed_op_sz_b0_b1_id(kOperandTypeVar, 0, kInvalidReg, kInvalidReg, kInvalidValue);
_init_packed_d2_d3(kInvalidValue, kInvalidValue);
}

//! Get whether the variable has been initialized by `Compiler`.
ASMJIT_INLINE bool isInitialized() const {
return _vreg.id != kInvalidValue;
Expand Down Expand Up @@ -2954,15 +2960,51 @@ struct ASMJIT_VCLASS Compiler : public CodeGen {
ASMJIT_API void alloc(Var& var);
//! Alloc variable `var` using `regIndex` as a register index.
ASMJIT_API void alloc(Var& var, uint32_t regIndex);
//! Alloc variable `var` using `reg` as a demanded register.
//! Alloc variable `var` using `reg` as a register operand.
ASMJIT_API void alloc(Var& var, const Reg& reg);
//! Spill variable `var`.
ASMJIT_API void spill(Var& var);
//! Save variable `var` if modified.
//! Save variable `var` if the status is `modified` at this point.
ASMJIT_API void save(Var& var);
//! Unuse variable `var`.
ASMJIT_API void unuse(Var& var);

//! Alloc variable `var` (if initialized), but only if it's initialized.
ASMJIT_INLINE void allocUnsafe(Var& var) {
if (var.isInitialized())
alloc(var);
}

//! Alloc variable `var` (if initialized) using `regIndex` as a register index
ASMJIT_INLINE void allocUnsafe(Var& var, uint32_t regIndex) {
if (var.isInitialized())
alloc(var, regIndex);
}

//! Alloc variable `var` (if initialized) using `reg` as a register operand.
ASMJIT_INLINE void allocUnsafe(Var& var, const Reg& reg) {
if (var.isInitialized())
alloc(var, reg);
}

//! Spill variable `var` (if initialized).
ASMJIT_INLINE void spillUnsafe(Var& var) {
if (var.isInitialized())
spill(var);
}

//! Save variable `var` (if initialized) if the status is `modified` at this point.
ASMJIT_INLINE void saveUnsafe(Var& var) {
if (var.isInitialized())
save(var);
}

//! Unuse variable `var` (if initialized).
ASMJIT_INLINE void unuseUnsafe(Var& var) {
if (var.isInitialized())
unuse(var);
}

//! Get priority of variable `var`.
ASMJIT_API uint32_t getPriority(Var& var) const;
//! Set priority of variable `var` to `priority`.
Expand Down
18 changes: 0 additions & 18 deletions src/asmjit/contrib.h

This file was deleted.

79 changes: 0 additions & 79 deletions src/asmjit/contrib/winremoteruntime.cpp

This file was deleted.

74 changes: 0 additions & 74 deletions src/asmjit/contrib/winremoteruntime.h

This file was deleted.

6 changes: 0 additions & 6 deletions src/asmjit/x86/x86compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,6 @@ struct X86Var : public Var {
return X86Var(*this);
}

//! Reset X86Var operand.
ASMJIT_INLINE void reset() {
_init_packed_op_sz_b0_b1_id(kOperandTypeVar, 0, kInvalidReg, kInvalidReg, kInvalidValue);
_init_packed_d2_d3(kInvalidValue, kInvalidValue);
}

// --------------------------------------------------------------------------
// [Type]
// --------------------------------------------------------------------------
Expand Down

0 comments on commit eef8f78

Please sign in to comment.