2
0

itllvm.pas 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  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. 'invalid1', { la_x_to_inttoptr }
  57. 'invalid2', { la_ptrtoint_to_x }
  58. 'asm' { la_asmblock }
  59. );
  60. llvm_cond2str : array[topcmp] of ansistring = ('',
  61. 'eq',
  62. 'sgt',
  63. 'slt',
  64. 'sge',
  65. 'sle',
  66. 'ne',
  67. 'ule',
  68. 'ult',
  69. 'uge',
  70. 'ugt'
  71. );
  72. llvm_fpcond2str: array[tllvmfpcmp] of ansistring = (
  73. 'invalid',
  74. 'false',
  75. 'oeq', 'ogt', 'oge', 'olt', 'ole', 'one', 'ord',
  76. 'ueq', 'ugt', 'uge', 'ult', 'ule', 'une', 'uno',
  77. 'true');
  78. implementation
  79. end.