Home
last modified time | relevance | path

Searched refs:BytecodeEmitter (Results 1 – 20 of 20) sorted by relevance

/arkcompiler/runtime_core/libpandafile/tests/
Dbytecode_emitter_tests.cpp102 HWTEST(BytecodeEmitter, JmpBwd_IMM8, testing::ext::TestSize.Level0)
104 BytecodeEmitter emitter;
113 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out));
122 HWTEST(BytecodeEmitter, JmpFwd_IMM8, testing::ext::TestSize.Level0)
124 BytecodeEmitter emitter;
136 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out));
145 HWTEST(BytecodeEmitter, JmpBwd_IMM16, testing::ext::TestSize.Level0)
148 BytecodeEmitter emitter;
157 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out));
166 BytecodeEmitter emitter;
[all …]
/arkcompiler/runtime_core/static_core/libpandafile/tests/
Dbytecode_emitter_tests.cpp104 TEST(BytecodeEmitter, JmpBwd_IMM8) in TEST() argument
106 BytecodeEmitter emitter; in TEST()
115 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out)); in TEST()
124 TEST(BytecodeEmitter, JmpFwd_IMM8) in TEST() argument
126 BytecodeEmitter emitter; in TEST()
138 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out)); in TEST()
147 TEST(BytecodeEmitter, JmpBwd_IMM16) in TEST() argument
150 BytecodeEmitter emitter; in TEST()
159 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out)); in TEST()
168 BytecodeEmitter emitter; in TEST()
[all …]
/arkcompiler/runtime_core/static_core/libpandafile/
Dbytecode_emitter.h30 class BytecodeEmitter; variable
52 friend class BytecodeEmitter; variable
55 class BytecodeEmitter {
73 BytecodeEmitter() = default;
75 ~BytecodeEmitter() = default;
77 NO_COPY_SEMANTIC(BytecodeEmitter);
78 NO_MOVE_SEMANTIC(BytecodeEmitter);
111 …BytecodeInstruction::Opcode GetSuitableJump(BytecodeInstruction::Opcode opcode, BytecodeEmitter::B…
Dbytecode_emitter.cpp26 using BitImmSize = BytecodeEmitter::BitImmSize;
122 void BytecodeEmitter::Bind(const Label &label) in Bind()
128 BytecodeEmitter::ErrorCode BytecodeEmitter::Build(std::vector<uint8_t> *output) in Build()
155 BytecodeEmitter::ErrorCode BytecodeEmitter::ReserveSpaceForOffsets() in ReserveSpaceForOffsets()
190 BytecodeEmitter::ErrorCode BytecodeEmitter::DoReserveSpaceForOffset(const BytecodeInstruction &insn… in DoReserveSpaceForOffset()
223 BytecodeEmitter::ErrorCode BytecodeEmitter::UpdateBranches() in UpdateBranches()
234 void BytecodeEmitter::UpdateLabelTargets(uint32_t pc, size_t bias) in UpdateLabelTargets()
250 int32_t BytecodeEmitter::EstimateMaxDistance(uint32_t insnPc, uint32_t targetPc, uint32_t bias) con… in EstimateMaxDistance()
277 BytecodeEmitter::ErrorCode BytecodeEmitter::CheckLabels() in CheckLabels()
/arkcompiler/runtime_core/libpandafile/
Dbytecode_emitter.h30 class BytecodeEmitter; variable
52 friend class BytecodeEmitter; variable
55 class BytecodeEmitter {
73 BytecodeEmitter() : pc_(0) {} in BytecodeEmitter() function
75 ~BytecodeEmitter() = default;
77 NO_COPY_SEMANTIC(BytecodeEmitter);
78 NO_MOVE_SEMANTIC(BytecodeEmitter);
113 …BytecodeInstruction::Opcode GetSuitableJump(BytecodeInstruction::Opcode opcode, BytecodeEmitter::B…
Dbytecode_emitter.cpp26 using BitImmSize = BytecodeEmitter::BitImmSize;
123 void BytecodeEmitter::Bind(const Label &label) in Bind()
129 BytecodeEmitter::ErrorCode BytecodeEmitter::Build(std::vector<uint8_t> *output) in Build()
156 BytecodeEmitter::ErrorCode BytecodeEmitter::ReserveSpaceForOffsets() in ReserveSpaceForOffsets()
191 BytecodeEmitter::ErrorCode BytecodeEmitter::DoReserveSpaceForOffset(const BytecodeInstruction &insn… in DoReserveSpaceForOffset()
223 BytecodeEmitter::ErrorCode BytecodeEmitter::UpdateBranches() in UpdateBranches()
234 void BytecodeEmitter::UpdateLabelTargets(uint32_t pc, size_t bias) in UpdateLabelTargets()
250 int32_t BytecodeEmitter::EstimateMaxDistance(uint32_t insn_pc, uint32_t target_pc, uint32_t bias) c… in EstimateMaxDistance()
282 BytecodeEmitter::ErrorCode BytecodeEmitter::CheckLabels() in CheckLabels()
/arkcompiler/runtime_core/static_core/runtime/tests/
Dinterpreter_test.cpp177 BytecodeEmitter emitter; in TEST_F()
213 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F()
287 BytecodeEmitter emitter; in TEST_F()
320 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F()
402 void TestUnimpelemented(const std::function<void(BytecodeEmitter *)> &emit) in TestUnimpelemented()
404 BytecodeEmitter emitter; in TestUnimpelemented()
409 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TestUnimpelemented()
424 BytecodeEmitter emitter; in TEST_F()
449 ASSERT_EQ(emitter.Build(&bytecode), BytecodeEmitter::ErrorCode::SUCCESS); in TEST_F()
478 BytecodeEmitter emitter; in TestFcmp()
[all …]
Dc2i_bridge_test.cpp38 using BytecodeEmitter = ark::BytecodeEmitter; typedef
/arkcompiler/runtime_core/static_core/libpandafile/templates/tests/
Dbytecode_emitter_tests_gen.h.erb74 TEST(BytecodeEmitter, <%= emitter_name %>) {
75 TestNoneFormat(Opcode::<%= i.opcode.upcase %>, [](BytecodeEmitter* emitter){
84 TEST(BytecodeEmitter, <%= emitter_name %>Bwd_<%= pretty_format %>) {
85 …JcmpBwd_<%= pretty_format %>(Opcode::<%= opcode %>, [](BytecodeEmitter* emitter, uint8_t reg, cons…
90 TEST(BytecodeEmitter, <%= emitter_name %>Fwd_<%= pretty_format %>) {
91 …JcmpFwd_<%= pretty_format %>(Opcode::<%= opcode %>, [](BytecodeEmitter* emitter, uint8_t reg, cons…
103 TEST(BytecodeEmitter, <%= emitter_name %>_<%= pretty_format %>) {
104 …Jcmpz_<%= pretty_format %>(Opcode::<%= opcode %>, [](BytecodeEmitter* emitter, const Label &label){
111 TEST(BytecodeEmitter, <%= emitter_name %>_<%= i.format.pretty.upcase %>) {
146 BytecodeEmitter emitter;
[all …]
/arkcompiler/runtime_core/libpandafile/templates/
Dbytecode_emitter_gen.h.erb65 void BytecodeEmitter::<%= emitter_name %>(<%= signature_str %>) {
113 size_t BytecodeEmitter::GetSizeByOpcode(<%= OPCODE_TYPE %> opcode) {
149 void BytecodeEmitter::UpdateBranchOffs(uint8_t *insn, int32_t offs) {
166 BytecodeEmitter::BitImmSize BytecodeEmitter::GetBitImmSizeByOpcode(<%= OPCODE_TYPE %> opcode) {
171 return BytecodeEmitter::BitImmSize::BITSIZE_<%= insn.operands.select(&:imm?).first.width %>;
176 …return BytecodeEmitter::BitImmSize::BITSIZE_32; // Any return value will do, we are broken here a…
182 <%= OPCODE_TYPE %> BytecodeEmitter::RevertConditionCode(<%= OPCODE_TYPE %> opcode) {
209 <%= OPCODE_TYPE %> BytecodeEmitter::GetLongestJump(<%= OPCODE_TYPE %> opcode) {
228 <%= OPCODE_TYPE %> BytecodeEmitter::GetSuitableJump(<%= OPCODE_TYPE %> opcode, BytecodeEmitter::Bit…
244 case BytecodeEmitter::BitImmSize::BITSIZE_<%= w %>:
/arkcompiler/runtime_core/static_core/libpandafile/templates/
Dbytecode_emitter_gen.h.erb66 void BytecodeEmitter::<%= emitter_name %>(<%= signature_str %>) {
114 size_t BytecodeEmitter::GetSizeByOpcode(<%= OPCODE_TYPE %> opcode) {
150 void BytecodeEmitter::UpdateBranchOffs(uint8_t *insn, int32_t offs) {
167 BytecodeEmitter::BitImmSize BytecodeEmitter::GetBitImmSizeByOpcode(<%= OPCODE_TYPE %> opcode) {
172 return BytecodeEmitter::BitImmSize::BITSIZE_<%= insn.operands.select(&:imm?).first.width %>;
177 …return BytecodeEmitter::BitImmSize::BITSIZE_32; // Any return value will do, we are broken here a…
183 <%= OPCODE_TYPE %> BytecodeEmitter::RevertConditionCode(<%= OPCODE_TYPE %> opcode) {
210 <%= OPCODE_TYPE %> BytecodeEmitter::GetLongestJump(<%= OPCODE_TYPE %> opcode) {
229 <%= OPCODE_TYPE %> BytecodeEmitter::GetSuitableJump(<%= OPCODE_TYPE %> opcode, BytecodeEmitter::Bit…
245 case BytecodeEmitter::BitImmSize::BITSIZE_<%= w %>:
/arkcompiler/runtime_core/libpandafile/templates/tests/
Dbytecode_emitter_tests_gen.h.erb250 HWTEST(BytecodeEmitter, <%= emitter_name %>, testing::ext::TestSize.Level0)
252 TestNoneFormat(Opcode::<%= i.opcode.upcase %>, [](BytecodeEmitter* emitter) {
262 HWTEST(BytecodeEmitter, <%= emitter_name %>_<%= pretty_format %>_AUTO, testing::ext::TestSize.Level…
264 …Jmpz_<%= pretty_format %>(Opcode::<%= opcode %>, [](BytecodeEmitter* emitter, const Label &label) {
275 HWTEST(BytecodeEmitter, <%= emitter_name %>_<%= pretty_format %>_AUTO, testing::ext::TestSize.Level…
277 …Jmp_<%= pretty_format %>(Opcode::<%= opcode %>, [](BytecodeEmitter* emitter, uint8_t reg, const La…
286 HWTEST(BytecodeEmitter, <%= emitter_name %>_<%= i.format.pretty.upcase %>_AUTO, testing::ext::TestS…
322 BytecodeEmitter emitter;
325 ASSERT_EQ(BytecodeEmitter::ErrorCode::SUCCESS, emitter.Build(&out));
/arkcompiler/runtime_core/static_core/assembler/
Dassembly-function.h133 bool Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method,
Dassembly-ins.h122 bool Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method,
Dassembly-emitter.cpp1439 auto emitter = BytecodeEmitter {}; in EmitFunctions()
1457 if (status != BytecodeEmitter::ErrorCode::SUCCESS) { in EmitFunctions()
1625 bool Function::Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method, in Emit()
/arkcompiler/runtime_core/assembler/
Dassembly-ins.h110 bool Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method,
Dassembly-function.h154 bool Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method,
Dassembly-emitter.cpp1321 auto emitter = BytecodeEmitter {}; in EmitFunctions()
1339 if (status != BytecodeEmitter::ErrorCode::SUCCESS) { in EmitFunctions()
1539 bool Function::Emit(BytecodeEmitter &emitter, panda_file::MethodItem *method, in Emit()
/arkcompiler/runtime_core/assembler/templates/
Dins_emit.h.erb20 bool Ins::Emit(BytecodeEmitter& emitter, panda_file::MethodItem *method,
/arkcompiler/runtime_core/static_core/assembler/templates/
Dins_emit.h.erb24 bool Ins::Emit(BytecodeEmitter& emitter, panda_file::MethodItem *method,