libTriton version 1.0 build 1592
Loading...
Searching...
No Matches
aarch64Semantics.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_AARCH64SEMANTICS_H
9#define TRITON_AARCH64SEMANTICS_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 aarch64 {
55 private:
57 triton::arch::Architecture* architecture;
58
61
64
67
70
71 public:
73 TRITON_EXPORT AArch64Semantics(triton::arch::Architecture* architecture,
76 const triton::ast::SharedAstContext& astCtxt);
77
80
81 private:
83 void controlFlow_s(triton::arch::Instruction& inst);
84
89
91 bool getCodeConditionTainteSate(const triton::arch::Instruction& inst);
92
93 /* Generic flags computation ------------------------------------- */
94
96 void clearFlag_s(triton::arch::Instruction& inst, const triton::arch::Register& flag, std::string comment="");
97
99 void setFlag_s(triton::arch::Instruction& inst, const triton::arch::Register& flag, std::string comment="");
100
102 void nf_s(triton::arch::Instruction& inst,
105
107 void nfCcmp_s(triton::arch::Instruction& inst,
111
113 void zf_s(triton::arch::Instruction& inst,
116
118 void zfCcmp_s(triton::arch::Instruction& inst,
122
123 /* Specific flags computation ------------------------------------ */
124
126 void cfAdd_s(triton::arch::Instruction& inst,
131
133 void cfSub_s(triton::arch::Instruction& inst,
138
140 void cfCcmp_s(triton::arch::Instruction& inst,
146
148 void vfAdd_s(triton::arch::Instruction& inst,
153
155 void vfSub_s(triton::arch::Instruction& inst,
160
162 void vfCcmp_s(triton::arch::Instruction& inst,
168
169 /* Instruction semantics ----------------------------------------- */
170
172 void adc_s(triton::arch::Instruction& inst);
173
175 void add_s(triton::arch::Instruction& inst);
176
178 void adr_s(triton::arch::Instruction& inst);
179
181 void adrp_s(triton::arch::Instruction& inst);
182
184 void and_s(triton::arch::Instruction& inst);
185
187 void asr_s(triton::arch::Instruction& inst);
188
190 void b_s(triton::arch::Instruction& inst);
191
193 void bfi_s(triton::arch::Instruction& inst);
194
196 void bfxil_s(triton::arch::Instruction& inst);
197
199 void bic_s(triton::arch::Instruction& inst);
200
202 void bl_s(triton::arch::Instruction& inst);
203
205 void blr_s(triton::arch::Instruction& inst);
206
208 void br_s(triton::arch::Instruction& inst);
209
211 void brk_s(triton::arch::Instruction& inst);
212
214 void cbnz_s(triton::arch::Instruction& inst);
215
217 void cbz_s(triton::arch::Instruction& inst);
218
220 void ccmp_s(triton::arch::Instruction& inst);
221
223 void cinc_s(triton::arch::Instruction& inst);
224
226 void clz_s(triton::arch::Instruction& inst);
227
229 void cmn_s(triton::arch::Instruction& inst);
230
232 void cmp_s(triton::arch::Instruction& inst);
233
235 void cneg_s(triton::arch::Instruction& inst);
236
238 void csel_s(triton::arch::Instruction& inst);
239
241 void cset_s(triton::arch::Instruction& inst);
242
244 void csinc_s(triton::arch::Instruction& inst);
245
247 void csneg_s(triton::arch::Instruction& inst);
248
250 void eon_s(triton::arch::Instruction& inst);
251
253 void eor_s(triton::arch::Instruction& inst);
254
256 void extr_s(triton::arch::Instruction& inst);
257
259 void fmov_s(triton::arch::Instruction& inst);
260
262 void ld3_s(triton::arch::Instruction& inst);
263
265 void ld3r_s(triton::arch::Instruction& inst);
266
268 void ld4_s(triton::arch::Instruction& inst);
269
271 void ld4r_s(triton::arch::Instruction& inst);
272
274 void ldar_s(triton::arch::Instruction& inst);
275
277 void ldarb_s(triton::arch::Instruction& inst);
278
280 void ldarh_s(triton::arch::Instruction& inst);
281
283 void ldaxr_s(triton::arch::Instruction& inst);
284
286 void ldaxrb_s(triton::arch::Instruction& inst);
287
289 void ldaxrh_s(triton::arch::Instruction& inst);
290
292 void ldnp_s(triton::arch::Instruction& inst);
293
295 void ldp_s(triton::arch::Instruction& inst);
296
298 void ldpsw_s(triton::arch::Instruction& inst);
299
301 void ldr_s(triton::arch::Instruction& inst);
302
304 void ldrb_s(triton::arch::Instruction& inst);
305
307 void ldrh_s(triton::arch::Instruction& inst);
308
310 void ldrsb_s(triton::arch::Instruction& inst);
311
313 void ldrsh_s(triton::arch::Instruction& inst);
314
316 void ldrsw_s(triton::arch::Instruction& inst);
317
319 void ldtr_s(triton::arch::Instruction& inst);
320
322 void ldtrb_s(triton::arch::Instruction& inst);
323
325 void ldtrh_s(triton::arch::Instruction& inst);
326
328 void ldtrsb_s(triton::arch::Instruction& inst);
329
331 void ldtrsh_s(triton::arch::Instruction& inst);
332
334 void ldtrsw_s(triton::arch::Instruction& inst);
335
337 void ldur_s(triton::arch::Instruction& inst);
338
340 void ldurb_s(triton::arch::Instruction& inst);
341
343 void ldurh_s(triton::arch::Instruction& inst);
344
346 void ldursb_s(triton::arch::Instruction& inst);
347
349 void ldursh_s(triton::arch::Instruction& inst);
350
352 void ldursw_s(triton::arch::Instruction& inst);
353
355 void ldxp_s(triton::arch::Instruction& inst);
356
358 void ldxr_s(triton::arch::Instruction& inst);
359
361 void ldxrb_s(triton::arch::Instruction& inst);
362
364 void ldxrh_s(triton::arch::Instruction& inst);
365
367 void lsl_s(triton::arch::Instruction& inst);
368
370 void lsr_s(triton::arch::Instruction& inst);
371
373 void madd_s(triton::arch::Instruction& inst);
374
376 void mneg_s(triton::arch::Instruction& inst);
377
379 void mov_s(triton::arch::Instruction& inst);
380
382 void movi_s(triton::arch::Instruction& inst);
383
385 void movk_s(triton::arch::Instruction& inst);
386
388 void movn_s(triton::arch::Instruction& inst);
389
391 void movz_s(triton::arch::Instruction& inst);
392
394 void mrs_s(triton::arch::Instruction& inst);
395
397 void msr_s(triton::arch::Instruction& inst);
398
400 void msub_s(triton::arch::Instruction& inst);
401
403 void mul_s(triton::arch::Instruction& inst);
404
406 void mvn_s(triton::arch::Instruction& inst);
407
409 void neg_s(triton::arch::Instruction& inst);
410
412 void nop_s(triton::arch::Instruction& inst);
413
415 void orn_s(triton::arch::Instruction& inst);
416
418 void orr_s(triton::arch::Instruction& inst);
419
421 void rbit_s(triton::arch::Instruction& inst);
422
424 void ret_s(triton::arch::Instruction& inst);
425
427 void rev_s(triton::arch::Instruction& inst);
428
430 void rev16_s(triton::arch::Instruction& inst);
431
433 void rev32_s(triton::arch::Instruction& inst);
434
436 void ror_s(triton::arch::Instruction& inst);
437
439 void sbc_s(triton::arch::Instruction& inst);
440
442 void sbfx_s(triton::arch::Instruction& inst);
443
445 void sdiv_s(triton::arch::Instruction& inst);
446
448 void smaddl_s(triton::arch::Instruction& inst);
449
451 void smsubl_s(triton::arch::Instruction& inst);
452
454 void smulh_s(triton::arch::Instruction& inst);
455
457 void smull_s(triton::arch::Instruction& inst);
458
460 void stlr_s(triton::arch::Instruction& inst);
461
463 void stlrb_s(triton::arch::Instruction& inst);
464
466 void stlrh_s(triton::arch::Instruction& inst);
467
469 void stlxr_s(triton::arch::Instruction& inst);
470
472 void stlxrb_s(triton::arch::Instruction& inst);
473
475 void stlxrh_s(triton::arch::Instruction& inst);
476
478 void stnp_s(triton::arch::Instruction& inst);
479
481 void stp_s(triton::arch::Instruction& inst);
482
484 void str_s(triton::arch::Instruction& inst);
485
487 void strb_s(triton::arch::Instruction& inst);
488
490 void strh_s(triton::arch::Instruction& inst);
491
493 void sttr_s(triton::arch::Instruction& inst);
494
496 void sttrb_s(triton::arch::Instruction& inst);
497
499 void sttrh_s(triton::arch::Instruction& inst);
500
502 void stur_s(triton::arch::Instruction& inst);
503
505 void sturb_s(triton::arch::Instruction& inst);
506
508 void sturh_s(triton::arch::Instruction& inst);
509
511 void stxp_s(triton::arch::Instruction& inst);
512
514 void stxr_s(triton::arch::Instruction& inst);
515
517 void stxrb_s(triton::arch::Instruction& inst);
518
520 void stxrh_s(triton::arch::Instruction& inst);
521
523 void sub_s(triton::arch::Instruction& inst);
524
526 void svc_s(triton::arch::Instruction& inst);
527
529 void sxtb_s(triton::arch::Instruction& inst);
530
532 void sxth_s(triton::arch::Instruction& inst);
533
535 void sxtw_s(triton::arch::Instruction& inst);
536
538 void tbnz_s(triton::arch::Instruction& inst);
539
541 void tbz_s(triton::arch::Instruction& inst);
542
544 void tst_s(triton::arch::Instruction& inst);
545
547 void ubfiz_s(triton::arch::Instruction& inst);
548
550 void ubfx_s(triton::arch::Instruction& inst);
551
553 void udiv_s(triton::arch::Instruction& inst);
554
556 void umaddl_s(triton::arch::Instruction& inst);
557
559 void umov_s(triton::arch::Instruction& inst);
560
562 void umnegl_s(triton::arch::Instruction& inst);
563
565 void umsubl_s(triton::arch::Instruction& inst);
566
568 void umulh_s(triton::arch::Instruction& inst);
569
571 void umull_s(triton::arch::Instruction& inst);
572
574 void uxtb_s(triton::arch::Instruction& inst);
575
577 void uxth_s(triton::arch::Instruction& inst);
578 };
579
581 };
583 };
585 };
587};
588
589#endif /* TRITON_AARCH64SEMANTICS_H */
The abstract architecture class.
This class is used to represent an instruction.
This class is used as operand wrapper.
This class is used when an instruction has a register operand.
Definition register.hpp:44
This interface is used as abstract semantics interface. All ISA semantics must use this interface.
TRITON_EXPORT triton::arch::exception_e buildSemantics(triton::arch::Instruction &inst)
Builds the semantics of the instruction. Returns triton::arch::NO_FAULT if succeed.
TRITON_EXPORT AArch64Semantics(triton::arch::Architecture *architecture, triton::engines::symbolic::SymbolicEngine *symbolicEngine, triton::engines::taint::TaintEngine *taintEngine, const triton::ast::SharedAstContext &astCtxt)
Constructor.
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
The Triton namespace.