Artifact 7f6d7fc662c0439e3d5b2fe363c82928bd0333c8:


0000: 2f 2f 20 41 73 73 65 6d 62 6c 79 20 6c 61 6e 67  // Assembly lang
0010: 75 61 67 65 20 73 75 70 70 6f 72 74 20 66 6f 72  uage support for
0020: 20 6d 36 38 6b 20 43 50 55 2e 0a 2f 2f 20 42 72   m68k CPU..// Br
0030: 75 6e 6f 20 48 61 69 62 6c 65 20 32 39 2e 35 2e  uno Haible 29.5.
0040: 31 39 39 39 0a 0a 23 69 66 64 65 66 20 41 53 4d  1999..#ifdef ASM
0050: 5f 55 4e 44 45 52 53 43 4f 52 45 0a 2f 2f 20 53  _UNDERSCORE.// S
0060: 75 6e 4f 53 2c 20 4e 65 74 42 53 44 2c 20 4f 70  unOS, NetBSD, Op
0070: 65 6e 42 53 44 2c 20 4c 69 6e 75 78 2f 61 2e 6f  enBSD, Linux/a.o
0080: 75 74 0a 23 64 65 66 69 6e 65 20 43 28 65 6e 74  ut.#define C(ent
0090: 72 79 70 6f 69 6e 74 29 20 5f 23 23 65 6e 74 72  rypoint) _##entr
00a0: 79 70 6f 69 6e 74 0a 23 65 6c 73 65 0a 2f 2f 20  ypoint.#else.// 
00b0: 53 56 52 34 2c 20 41 2f 55 58 2c 20 41 4d 49 58  SVR4, A/UX, AMIX
00c0: 2c 20 41 74 61 72 69 2c 20 4c 69 6e 75 78 2f 45  , Atari, Linux/E
00d0: 4c 46 0a 23 64 65 66 69 6e 65 20 43 28 65 6e 74  LF.#define C(ent
00e0: 72 79 70 6f 69 6e 74 29 20 65 6e 74 72 79 70 6f  rypoint) entrypo
00f0: 69 6e 74 0a 23 65 6e 64 69 66 0a 0a 2f 2f 20 57  int.#endif..// W
0100: 68 65 6e 20 61 73 73 65 6d 62 6c 79 20 6c 61 6e  hen assembly lan
0110: 67 75 61 67 65 20 63 6f 64 65 20 69 73 20 63 6f  guage code is co
0120: 6d 70 69 6c 65 64 20 69 6e 74 6f 20 61 20 73 68  mpiled into a sh
0130: 61 72 65 64 20 6c 69 62 72 61 72 79 2c 20 45 4c  ared library, EL
0140: 46 20 6c 69 6e 6b 65 72 73 0a 2f 2f 20 6e 65 65  F linkers.// nee
0150: 64 20 74 6f 20 6b 6e 6f 77 20 77 68 69 63 68 20  d to know which 
0160: 73 79 6d 62 6f 6c 73 20 61 72 65 20 66 75 6e 63  symbols are func
0170: 74 69 6f 6e 73 2e 0a 23 69 66 20 64 65 66 69 6e  tions..#if defin
0180: 65 64 28 5f 5f 4e 65 74 42 53 44 5f 5f 29 20 7c  ed(__NetBSD__) |
0190: 7c 20 64 65 66 69 6e 65 64 28 5f 5f 4f 70 65 6e  | defined(__Open
01a0: 42 53 44 5f 5f 29 20 7c 7c 20 64 65 66 69 6e 65  BSD__) || define
01b0: 64 28 5f 5f 45 4c 46 5f 5f 29 20 7c 7c 20 64 65  d(__ELF__) || de
01c0: 66 69 6e 65 64 28 5f 5f 73 76 72 34 5f 5f 29 0a  fined(__svr4__).
01d0: 23 64 65 66 69 6e 65 20 44 45 43 4c 41 52 45 5f  #define DECLARE_
01e0: 46 55 4e 43 54 49 4f 4e 28 6e 61 6d 65 29 20 2e  FUNCTION(name) .
01f0: 74 79 70 65 20 43 28 6e 61 6d 65 29 2c 40 66 75  type C(name),@fu
0200: 6e 63 74 69 6f 6e 0a 23 65 6c 73 65 0a 23 64 65  nction.#else.#de
0210: 66 69 6e 65 20 44 45 43 4c 41 52 45 5f 46 55 4e  fine DECLARE_FUN
0220: 43 54 49 4f 4e 28 6e 61 6d 65 29 0a 23 65 6e 64  CTION(name).#end
0230: 69 66 0a                                         if.