sysutilp.inc 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. {
  2. $Id$
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2003 by Peter Vreman,
  5. member of the Free Pascal development team
  6. See the file COPYING.FPC, included in this distribution,
  7. for details about the copyright.
  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.
  11. **********************************************************************}
  12. { ---------------------------------------------------------------------
  13. This include contains cpu-specific routines
  14. ---------------------------------------------------------------------}
  15. function InterLockedDecrement (var Target: integer) : Integer; assembler;
  16. asm
  17. {$warning FIXME}
  18. end;
  19. (*
  20. { input: address of target in r3 }
  21. { output: target-1 in r3 }
  22. { side-effect: target := target-1 }
  23. asm
  24. InterLockedDecLoop:
  25. lwarx r0,r0,r3
  26. subi r0,r0,1
  27. stwcx. r0,r0,r3
  28. bne InterLockedDecLoop
  29. mr r3,r0
  30. end;
  31. *)
  32. function InterLockedIncrement (var Target: integer) : Integer; assembler;
  33. asm
  34. {$warning FIXME}
  35. end;
  36. (*
  37. { input: address of target in r3 }
  38. { output: target+1 in r3 }
  39. { side-effect: target := target+1 }
  40. asm
  41. InterLockedIncLoop:
  42. lwarx r0,r0,r3
  43. addi r0,r0,1
  44. stwcx. r0,r0,r3
  45. bne InterLockedIncLoop
  46. mr r3,r0
  47. end;
  48. *)
  49. function InterLockedExchange (var Target: integer;Source : integer) : Integer; assembler;
  50. asm
  51. {$warning FIXME}
  52. end;
  53. (*
  54. { input: address of target in r3, source in r4 }
  55. { output: target in r3 }
  56. { side-effect: target := source }
  57. asm
  58. InterLockedXchgLoop:
  59. lwarx r0,r0,r3
  60. stwcx. r4,r0,r3
  61. bne InterLockedXchgLoop
  62. mr r3,r0
  63. end;
  64. *)
  65. function InterLockedExchangeAdd (var Target: integer;Source : integer) : Integer; assembler;
  66. asm
  67. {$warning FIXME}
  68. end;
  69. (*
  70. { input: address of target in r3, source in r4 }
  71. { output: target in r3 }
  72. { side-effect: target := target+source }
  73. asm
  74. InterLockedXchgAddLoop:
  75. lwarx r0,r0,r3
  76. add r0,r0,r4
  77. stwcx. r0,r0,r3
  78. bne InterLockedXchgAddLoop
  79. sub r3,r0,r4
  80. end;
  81. *)
  82. {
  83. $Log$
  84. Revision 1.1 2003-09-01 20:46:32 peter
  85. * new dummies
  86. }