2
0

itllvm.pas 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. {
  2. Copyright (c) 2013 by Jonas Maebe
  3. This unit contains the LLVM instruction tables
  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. unit itllvm;
  18. {$i fpcdefs.inc}
  19. interface
  20. uses
  21. llvmbase, cgbase;
  22. const
  23. llvm_op2str : llvmop2strtable = ('',
  24. { terminator instructions }
  25. 'ret', 'br', 'switch', 'indirectbr',
  26. 'invoke', 'resume',
  27. 'unreachable',
  28. { binary operations }
  29. 'add', 'fadd', 'sub', 'fsub', 'mul', 'fmul',
  30. 'udiv','sdiv', 'fdiv', 'urem', 'srem', 'frem',
  31. { bitwise binary operations }
  32. 'shl', 'lshr', 'ashr', 'and', 'or', 'xor',
  33. { vector operations }
  34. 'extractelement', 'insertelement', 'shufflevector',
  35. { aggregate operations }
  36. 'extractvalue', 'insertvalue',
  37. { memory access and memory addressing operations }
  38. 'alloca',
  39. 'load', 'store',
  40. 'fence', 'cmpxchg', 'atomicrmw',
  41. 'getelementptr',
  42. { conversion operations }
  43. 'trunc', 'zext', 'sext', 'fptrunc', 'fpext',
  44. 'fptoui', 'fptosi', 'uitofp', 'sitofp',
  45. 'ptrtoint', 'inttoptr',
  46. 'bitcast',
  47. { other operations }
  48. 'icmp', 'fcmp',
  49. 'phi', 'select', 'call',
  50. 'va_arg', 'landingpad',
  51. 'blockaddress',
  52. { fpc pseudo opcodes }
  53. 'type', { type definition }
  54. 'catch', { catch exception }
  55. 'filter', { exception filter }
  56. 'cleanup', { exception cleanup/finally }
  57. 'invalid1', { la_x_to_inttoptr }
  58. 'invalid2', { la_ptrtoint_to_x }
  59. 'asm' { la_asmblock }
  60. );
  61. llvm_cond2str : array[topcmp] of ansistring = ('',
  62. 'eq',
  63. 'sgt',
  64. 'slt',
  65. 'sge',
  66. 'sle',
  67. 'ne',
  68. 'ule',
  69. 'ult',
  70. 'uge',
  71. 'ugt'
  72. );
  73. llvm_fpcond2str: array[tllvmfpcmp] of ansistring = (
  74. 'invalid',
  75. 'false',
  76. 'oeq', 'ogt', 'oge', 'olt', 'ole', 'one', 'ord',
  77. 'ueq', 'ugt', 'uge', 'ult', 'ule', 'une', 'uno',
  78. 'true');
  79. implementation
  80. end.