libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
arm32Semantics.hpp
Go to the documentation of this file.
1
2/*
3** Copyright (C) - Triton
4**
5** This program is under the terms of the Apache License 2.0.
6*/
7
8#ifndef TRITON_ARM32SEMANTICS_H
9#define TRITON_ARM32SEMANTICS_H
10
11#include <triton/archEnums.hpp>
13#include <triton/dllexport.hpp>
18
19
20
22namespace triton {
29 namespace arch {
37 namespace arm {
45 namespace arm32 {
55 private:
57 triton::arch::Architecture* architecture;
58
61
64
67
70
71 public:
73 TRITON_EXPORT Arm32Semantics(triton::arch::Architecture* architecture,
76 const triton::ast::SharedAstContext& astCtxt);
77
80
81 private:
84
86 void updateExecutionState(triton::arch::OperandWrapper& dst, const triton::ast::SharedAbstractNode& node);
87
89 void exchangeInstructionSet(triton::arch::OperandWrapper& op, const triton::ast::SharedAbstractNode& node);
90
93
96
99
102
105
108
111
114
116 void controlFlow_s(triton::arch::Instruction& inst);
117
119 void controlFlow_s(triton::arch::Instruction& inst,
122
124 void controlFlow_s(triton::arch::Instruction& inst,
128
130 bool getCodeConditionTaintState(const triton::arch::Instruction& inst);
131
133 void spreadTaint(triton::arch::Instruction& inst,
136 const triton::arch::OperandWrapper& operand,
137 bool taint);
138
139 /* Generic flags computation ------------------------------------- */
140
142 void nf_s(triton::arch::Instruction& inst,
146
148 void zf_s(triton::arch::Instruction& inst,
152
153 /* Specific flags computation ------------------------------------ */
154
156 void cfAdd_s(triton::arch::Instruction& inst,
162
164 void cfSub_s(triton::arch::Instruction& inst,
170
172 void nfSmull_s(triton::arch::Instruction& inst,
178
180 void zfSmull_s(triton::arch::Instruction& inst,
186
188 void vfAdd_s(triton::arch::Instruction& inst,
194
196 void vfSub_s(triton::arch::Instruction& inst,
202
204 void cfBitwise_s(triton::arch::Instruction& inst,
208
210 void cfShift_s(triton::arch::Instruction& inst,
215 const triton::arch::arm::shift_e type);
216
218 void cfAsr_s(triton::arch::Instruction& inst,
223
225 void cfLsl_s(triton::arch::Instruction& inst,
230
232 void cfLsr_s(triton::arch::Instruction& inst,
237
239 void cfRor_s(triton::arch::Instruction& inst,
244
246 void cfRrx_s(triton::arch::Instruction& inst,
251
255 const triton::ast::SharedAbstractNode& shiftAmount);
256
259
262
263 /* Instruction semantics ----------------------------------------- */
264
266 void adc_s(triton::arch::Instruction& inst);
267
269 void add_s(triton::arch::Instruction& inst);
270
272 void adr_s(triton::arch::Instruction& inst);
273
275 void and_s(triton::arch::Instruction& inst);
276
278 void asr_s(triton::arch::Instruction& inst);
279
281 void b_s(triton::arch::Instruction& inst);
282
284 void bfc_s(triton::arch::Instruction& inst);
285
287 void bfi_s(triton::arch::Instruction& inst);
288
290 void bic_s(triton::arch::Instruction& inst);
291
293 void bl_s(triton::arch::Instruction& inst, bool exchange);
294
296 void bx_s(triton::arch::Instruction& inst);
297
299 void cbz_s(triton::arch::Instruction& inst);
300
302 void cbnz_s(triton::arch::Instruction& inst);
303
305 void clz_s(triton::arch::Instruction& inst);
306
308 void cmn_s(triton::arch::Instruction& inst);
309
311 void cmp_s(triton::arch::Instruction& inst);
312
314 void eor_s(triton::arch::Instruction& inst);
315
317 void it_s(triton::arch::Instruction& inst);
318
320 void ldm_s(triton::arch::Instruction& inst);
321
323 void ldr_s(triton::arch::Instruction& inst);
324
326 void ldrb_s(triton::arch::Instruction& inst);
327
329 void ldrex_s(triton::arch::Instruction& inst);
330
332 void ldrh_s(triton::arch::Instruction& inst);
333
335 void ldrsb_s(triton::arch::Instruction& inst);
336
338 void ldrsh_s(triton::arch::Instruction& inst);
339
341 void ldrd_s(triton::arch::Instruction& inst);
342
344 void lsl_s(triton::arch::Instruction& inst);
345
347 void lsr_s(triton::arch::Instruction& inst);
348
350 void mla_s(triton::arch::Instruction& inst);
351
353 void mls_s(triton::arch::Instruction& inst);
354
356 void mov_s(triton::arch::Instruction& inst);
357
359 void movt_s(triton::arch::Instruction& inst);
360
362 void mul_s(triton::arch::Instruction& inst);
363
365 void mvn_s(triton::arch::Instruction& inst);
366
368 void nop_s(triton::arch::Instruction& inst);
369
371 void orn_s(triton::arch::Instruction& inst);
372
374 void orr_s(triton::arch::Instruction& inst);
375
377 void pop_s(triton::arch::Instruction& inst);
378
380 void push_s(triton::arch::Instruction& inst);
381
383 void rbit_s(triton::arch::Instruction& inst);
384
386 void rev16_s(triton::arch::Instruction& inst);
387
389 void rev_s(triton::arch::Instruction& inst);
390
392 void ror_s(triton::arch::Instruction& inst);
393
395 void rrx_s(triton::arch::Instruction& inst);
396
398 void rsb_s(triton::arch::Instruction& inst);
399
401 void rsc_s(triton::arch::Instruction& inst);
402
404 void sbc_s(triton::arch::Instruction& inst);
405
407 void sbfx_s(triton::arch::Instruction& inst);
408
410 void sdiv_s(triton::arch::Instruction& inst);
411
413 void smlabb_s(triton::arch::Instruction& inst);
414
416 void smlabt_s(triton::arch::Instruction& inst);
417
419 void smlatb_s(triton::arch::Instruction& inst);
420
422 void smlatt_s(triton::arch::Instruction& inst);
423
425 void smull_s(triton::arch::Instruction& inst);
426
428 void stm_s(triton::arch::Instruction& inst);
429
431 void stmib_s(triton::arch::Instruction& inst);
432
434 void str_s(triton::arch::Instruction& inst);
435
437 void strb_s(triton::arch::Instruction& inst);
438
440 void strd_s(triton::arch::Instruction& inst);
441
443 void strex_s(triton::arch::Instruction& inst);
444
446 void strh_s(triton::arch::Instruction& inst);
447
449 void sub_s(triton::arch::Instruction& inst);
450
452 void sxtb_s(triton::arch::Instruction &inst);
453
455 void sxth_s(triton::arch::Instruction &inst);
456
458 void tst_s(triton::arch::Instruction& inst);
459
461 void tbb_s(triton::arch::Instruction& inst);
462
464 void tbh_s(triton::arch::Instruction& inst);
465
467 void teq_s(triton::arch::Instruction& inst);
468
470 void ubfx_s(triton::arch::Instruction &inst);
471
473 void udiv_s(triton::arch::Instruction& inst);
474
476 void umull_s(triton::arch::Instruction& inst);
477
479 void uxtb_s(triton::arch::Instruction & inst);
480
482 void uxth_s(triton::arch::Instruction & inst);
483
484 };
485
487 };
489 };
491 };
493};
494
495#endif /* TRITON_ARM32SEMANTICS_H */
The abstract architecture class.
This class is used to represent an instruction.
This class is used as operand wrapper.
This interface is used as abstract semantics interface. All ISA semantics must use this interface.
This class is used to represent specific properties of an Arm operand.
TRITON_EXPORT Arm32Semantics(triton::arch::Architecture *architecture, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::engines::taint::TaintEngine *taintEngine, const triton::ast::SharedAstContext &astCtxt)
Constructor.
TRITON_EXPORT triton::arch::exception_e buildSemantics(triton::arch::Instruction &inst)
Builds the semantics of the instruction. Returns triton::arch::NO_FAULT if succeed.
shift_e
Types of shift.
std::shared_ptr< triton::ast::AbstractNode > SharedAbstractNode
Shared Abstract Node.
Definition ast.hpp:59
std::shared_ptr< triton::ast::AstContext > SharedAstContext
Shared AST context.
Definition ast.hpp:65
std::shared_ptr< triton::engines::symbolic::SymbolicExpression > SharedSymbolicExpression
Shared Symbolic Expression.
Definition ast.hpp:40
std::uint64_t uint64
unisgned 64-bits
std::uint32_t uint32
unisgned 32-bits
The Triton namespace.