llvmbase.pas 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. {
  2. Copyright (c) 2007-2008 by Jonas Maebe
  3. Contains the base types for LLVM
  4. This program is free software; you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 2 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  15. ****************************************************************************
  16. }
  17. { This Unit contains the base types for LLVM
  18. }
  19. unit llvmbase;
  20. {$i fpcdefs.inc}
  21. interface
  22. uses
  23. strings,globtype,
  24. cutils,cclasses,aasmbase,cpuinfo,cgbase;
  25. {*****************************************************************************
  26. Assembler Opcodes
  27. *****************************************************************************}
  28. type
  29. tllvmop = (la_none,
  30. { terminator instructions }
  31. la_ret, la_br, la_switch, la_invoke, la_unwind, la_unreachable,
  32. { binary operations }
  33. la_add, la_sub, la_mul, la_div, la_urem, la_srem, la_frem,
  34. { bitwise binary operations }
  35. la_shl, la_lshr, la_ashr, la_and, la_or, la_xor,
  36. { vector operations }
  37. la_extractelement, la_insertelement, la_shufflevector,
  38. { memory access and memory addressing operations }
  39. la_malloc, la_free, la_alloca,
  40. la_load, la_store, la_getelementptr,
  41. { conversion operations }
  42. la_trunc, la_zext, la_sext, la_fptrunc, la_fpext,
  43. la_fptoui, la_fptosi, la_uitofp, la_sitofp,
  44. la_ptrtoint, la_inttoptr,
  45. la_bitcast,
  46. { other operations }
  47. la_icmp, la_fcmp,
  48. la_phi, la_select, la_call, la_va_arg, la_getresult,
  49. la_type);
  50. {# This should define the array of instructions as string }
  51. llvmop2strtable=array[tllvmop] of string[8];
  52. implementation
  53. end.