OLD | NEW |
1 //===- Intrinsics.td - Defines all LLVM intrinsics ---------*- tablegen -*-===// | 1 //===- Intrinsics.td - Defines all LLVM intrinsics ---------*- tablegen -*-===// |
2 // | 2 // |
3 // The LLVM Compiler Infrastructure | 3 // The LLVM Compiler Infrastructure |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file defines properties of all LLVM intrinsics. | 10 // This file defines properties of all LLVM intrinsics. |
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 def int_convertuif : Intrinsic<[llvm_anyint_ty], | 542 def int_convertuif : Intrinsic<[llvm_anyint_ty], |
543 [llvm_anyfloat_ty, llvm_i32_ty, llvm_i32_ty]>; | 543 [llvm_anyfloat_ty, llvm_i32_ty, llvm_i32_ty]>; |
544 def int_convertss : Intrinsic<[llvm_anyint_ty], | 544 def int_convertss : Intrinsic<[llvm_anyint_ty], |
545 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; | 545 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; |
546 def int_convertsu : Intrinsic<[llvm_anyint_ty], | 546 def int_convertsu : Intrinsic<[llvm_anyint_ty], |
547 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; | 547 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; |
548 def int_convertus : Intrinsic<[llvm_anyint_ty], | 548 def int_convertus : Intrinsic<[llvm_anyint_ty], |
549 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; | 549 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; |
550 def int_convertuu : Intrinsic<[llvm_anyint_ty], | 550 def int_convertuu : Intrinsic<[llvm_anyint_ty], |
551 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; | 551 [llvm_anyint_ty, llvm_i32_ty, llvm_i32_ty]>; |
552 | |
553 // Clear cache intrinsic, default to ignore (ie. emit nothing) | 552 // Clear cache intrinsic, default to ignore (ie. emit nothing) |
554 // maps to void __clear_cache() on supporting platforms | 553 // maps to void __clear_cache() on supporting platforms |
555 def int_clear_cache : Intrinsic<[], [llvm_ptr_ty, llvm_ptr_ty], | 554 def int_clear_cache : Intrinsic<[], [llvm_ptr_ty, llvm_ptr_ty], |
556 [], "llvm.clear_cache">; | 555 [], "llvm.clear_cache">; |
557 | 556 |
| 557 // @LOCALMOD-BEGIN |
| 558 //===----------------------- Native Client Intrinsics ---------------------===// |
| 559 // NaCl-specific setjmp/longjmp intrinsics. |
| 560 // See https://code.google.com/p/nativeclient/issues/detail?id=3429 |
| 561 def int_nacl_setjmp : Intrinsic<[llvm_i32_ty], [llvm_ptr_ty]>; |
| 562 def int_nacl_longjmp : Intrinsic<[], [llvm_ptr_ty, llvm_i32_ty], |
| 563 [IntrNoReturn]>; |
| 564 |
| 565 // Fast built-in version of NaCl's tls_get() IRT interface. |
| 566 def int_nacl_read_tp : Intrinsic<[llvm_ptr_ty], [], [IntrNoMem]>; |
| 567 |
| 568 // Atomic intrinsics. |
| 569 // |
| 570 // Volatiles and atomics are encoded through these intrinsics to make |
| 571 // them platform-independent, remove some of LLVM's legacy, and isolate |
| 572 // PNaCl from future changes to IR. The intrinsics allow user code to |
| 573 // use `__sync_*` builtins as well as C11/C++11 atomics. |
| 574 // |
| 575 // These are further documented in docs/PNaClLangRef.rst. |
| 576 // |
| 577 // Note that IntrReadWriteArgMem is used in all cases to prevent |
| 578 // reordering. |
| 579 def int_nacl_atomic_load : Intrinsic<[llvm_anyint_ty], |
| 580 [LLVMPointerType<LLVMMatchType<0>>, llvm_i32_ty], |
| 581 [IntrReadWriteArgMem]>; |
| 582 def int_nacl_atomic_store : Intrinsic<[], |
| 583 [llvm_anyint_ty, LLVMPointerType<LLVMMatchType<0>>, llvm_i32_ty], |
| 584 [IntrReadWriteArgMem]>; |
| 585 def int_nacl_atomic_rmw : Intrinsic<[llvm_anyint_ty], |
| 586 [llvm_i32_ty, LLVMPointerType<LLVMMatchType<0>>, LLVMMatchType<0>, |
| 587 llvm_i32_ty], |
| 588 [IntrReadWriteArgMem]>; |
| 589 def int_nacl_atomic_cmpxchg : Intrinsic<[llvm_anyint_ty], |
| 590 [LLVMPointerType<LLVMMatchType<0>>, LLVMMatchType<0>, LLVMMatchType<0>, |
| 591 llvm_i32_ty, llvm_i32_ty], |
| 592 [IntrReadWriteArgMem]>; |
| 593 def int_nacl_atomic_fence : Intrinsic<[], [llvm_i32_ty], |
| 594 [IntrReadWriteArgMem]>; |
| 595 def int_nacl_atomic_fence_all : Intrinsic<[], [], |
| 596 [IntrReadWriteArgMem]>; |
| 597 def int_nacl_atomic_is_lock_free : Intrinsic<[llvm_i1_ty], |
| 598 [llvm_i32_ty, llvm_ptr_ty], [IntrNoMem]>, |
| 599 GCCBuiltin<"__nacl_atomic_is_lock_free">; |
| 600 // @LOCALMOD-END |
| 601 |
558 //===----------------------------------------------------------------------===// | 602 //===----------------------------------------------------------------------===// |
559 // Target-specific intrinsics | 603 // Target-specific intrinsics |
560 //===----------------------------------------------------------------------===// | 604 //===----------------------------------------------------------------------===// |
561 | 605 |
562 include "llvm/IR/IntrinsicsPowerPC.td" | 606 include "llvm/IR/IntrinsicsPowerPC.td" |
563 include "llvm/IR/IntrinsicsX86.td" | 607 include "llvm/IR/IntrinsicsX86.td" |
564 include "llvm/IR/IntrinsicsARM.td" | 608 include "llvm/IR/IntrinsicsARM.td" |
565 include "llvm/IR/IntrinsicsAArch64.td" | 609 include "llvm/IR/IntrinsicsAArch64.td" |
566 include "llvm/IR/IntrinsicsXCore.td" | 610 include "llvm/IR/IntrinsicsXCore.td" |
567 include "llvm/IR/IntrinsicsHexagon.td" | 611 include "llvm/IR/IntrinsicsHexagon.td" |
568 include "llvm/IR/IntrinsicsNVVM.td" | 612 include "llvm/IR/IntrinsicsNVVM.td" |
569 include "llvm/IR/IntrinsicsMips.td" | 613 include "llvm/IR/IntrinsicsMips.td" |
570 include "llvm/IR/IntrinsicsR600.td" | 614 include "llvm/IR/IntrinsicsR600.td" |
OLD | NEW |