itllvm.pas 2.6 KB

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