Commit Graph

190 Commits (c3b4e9aa93255ddcc13c68e6c4ca7600ce85642d)

Author SHA1 Message Date
Alain Frisch 2ae09f0ae9 Getting rid of instruction suffixes: step 2, using pure Intel mnemonics for the 64-bit backend.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15388 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-30 14:18:25 +00:00
Alain Frisch 79fe0be8ad Avoid duplication in register names.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15366 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-29 13:39:01 +00:00
Alain Frisch d4affdb259 Rename NO -> NONE.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15354 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-26 16:11:54 +00:00
Alain Frisch 51472c925c Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15328 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 15:53:26 +00:00
Alain Frisch 7dea33dc40 Cosmetic, bringing i386 and amd64 versions of emit.mlp closer to each other.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15326 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-24 10:28:28 +00:00
Alain Frisch 3320a87fd2 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15309 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 12:59:54 +00:00
Alain Frisch 589640c1e4 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15308 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 12:54:41 +00:00
Alain Frisch 0344ab317a Fix (dlcode is modified later).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15305 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 12:07:59 +00:00
Alain Frisch 6bbc2d7a51 Textual emitters are responsible for emitting the whole file.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15302 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-23 08:36:45 +00:00
Alain Frisch 237406042b Represent the current location explicitly, not through gas encoding (special dot symbol).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15296 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 14:56:33 +00:00
Alain Frisch 80e8e2c24f Do not keep data_size with integer constants.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15294 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 14:47:30 +00:00
Alain Frisch 7e5a406a1c Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15293 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 14:30:58 +00:00
Alain Frisch 6f2c5e71ce Do not keep explicit datasize with immediate integer operands. Special support for movabsq.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15291 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 14:11:33 +00:00
Alain Frisch 4f4596d77c Represent symbol addresses in a uniform way in the AST. The instruction emitter decides the interpret them as absolute or relative addresses.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15287 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 11:51:53 +00:00
Alain Frisch 84e9598fc3 Simplify.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15285 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 11:37:53 +00:00
Alain Frisch 78445243b6 Split immediate symbol and immediate constant cases.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15284 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-22 11:35:50 +00:00
Alain Frisch 8d8120f4ab RxD 32-bit registers.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15254 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-17 16:22:47 +00:00
Alain Frisch b42015fc36 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15248 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-17 12:44:16 +00:00
Alain Frisch 4b002b1818 Cleanup. The align directive in the AST is normalized to the usual semantics. The different treatment for OSX is located in Intel_gas.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15247 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-17 12:41:35 +00:00
Alain Frisch 6ba7e0c625 Simplify ConstLabel (remove reloc_table, never used, not supported with MASM), remove ConstFloat (not used).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15235 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-17 07:52:25 +00:00
Alain Frisch 796c8e1233 Do not refer explictly to the Mem constructor in amd64/emit.mlp.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15234 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-17 07:40:28 +00:00
Alain Frisch 298f9a0352 Make datatype more explicit.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15229 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-16 14:33:13 +00:00
Alain Frisch 0931d3656a Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15224 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 16:01:05 +00:00
Alain Frisch 6f2f68f1e0 Cosmetic.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15223 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 15:51:47 +00:00
Alain Frisch 3dcaca9180 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15222 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 15:47:14 +00:00
Alain Frisch 71fdfdea44 Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15221 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 15:46:18 +00:00
Alain Frisch d942294b3a Cleanup.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15220 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-11 15:39:09 +00:00
Alain Frisch 9eb911370b Improve load_symbol_addr
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15208 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 11:37:28 +00:00
Alain Frisch 5868f17c7b Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15207 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 11:33:03 +00:00
Alain Frisch 7e768ca235 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15206 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 10:57:29 +00:00
Alain Frisch 9c896b5e5e Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15205 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 10:36:11 +00:00
Alain Frisch 782b892013 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15204 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 09:40:49 +00:00
Alain Frisch 6b73f95023 Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15203 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 09:30:19 +00:00
Alain Frisch 59f616aa99 Continue simplification.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15202 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 09:19:22 +00:00
Alain Frisch 8bbd041398 Starting to simplify/clenaup emit.mlp.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15201 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 09:07:50 +00:00
Alain Frisch 1b8f2a29f1 Forgot to apply emit_symbol.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15200 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-10 08:43:51 +00:00
Alain Frisch 5e9194ec6f Fix for mingw64.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15199 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-09 16:02:22 +00:00
Alain Frisch 5190950665 Comment.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15198 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-09 14:20:16 +00:00
Alain Frisch 9a414baa96 Allow a binary code emitter to avoid the creation of an assembly source file.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 14:46:53 +00:00
Alain Frisch 0652dda14d Factorize the sequencing of operations for setting up the assembly output, calling the assembler, closing/removing the assembly output.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15184 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-03 12:48:13 +00:00
Alain Frisch 46b8de0b24 emit_nt is not needed anymore.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-02 14:58:33 +00:00
Alain Frisch dfe5d892d9 Note.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15178 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-02 12:34:31 +00:00
Alain Frisch 6cd15407b4 Fix for msvc64.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15177 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-02 07:37:40 +00:00
Alain Frisch f39d50891a Fix for msvc64.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15176 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-09-02 07:36:59 +00:00
Alain Frisch 45f4535e99 Move the DSL part from intel_gas to its own module.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15160 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:40:25 +00:00
Alain Frisch e7ba464587 Add intel_proc.mli, get rid of arch64 bool ref, move StringSet/StringMap to misc.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15159 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:35:10 +00:00
Alain Frisch aab23e506e Share the masm criterion.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15158 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 14:01:23 +00:00
Alain Frisch 22e239cf91 Introducing a new module (pure interface) to define the AST of the intel assembly language.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15157 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 13:55:56 +00:00
Alain Frisch 2ce8520c2a Reindent + minor style tweaks.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15153 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 12:36:35 +00:00
Alain Frisch 9248774af5 Synchronize with trunk.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15147 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-29 10:37:43 +00:00
Damien Doligez cbfe627f92 merge changes from branch 4.02 from branching (rev 14852) to 4.02.0+rc1 (rev 15121)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15125 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-22 13:45:02 +00:00
Fabrice Le Fessant c6d4264a09 import new intel emit branch
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/abstract_intel_emit@15097 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-08-18 09:32:20 +00:00
Mark Shinwell a68f192d48 CSE bug on amd64: Ifloatsqrtf involves a memory load
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15004 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-07-16 09:24:59 +00:00
Xavier Leroy 657ba73021 Liveness & Deadcode: fix i386-specific issue with move instructions accessing
the x87 FP stack, which must not be eliminated.
CSEgen: harden against the same x87-specific issue + against reuse of
  values in fixed hardware registers that were destroyed by a prior
  operation.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14877 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-05-16 14:37:22 +00:00
Xavier Leroy 3ce32fba4f Wrong MASM syntax, try again.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14704 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-29 09:58:51 +00:00
Xavier Leroy 558f40e344 New back-end optimization pass: common subexpression elimination (CSE).
(Reuses results of previous computations instead of recomputing them.)
(Cherry-picked from branch backend-optim.)
Tested on amd64/linux and i386/linux.
Other back-ends compile (after assorted updates) but are untested.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14688 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 10:40:22 +00:00
Xavier Leroy 9c1d005ebb New back-end optimization pass: dead code elimination.
(Removes arithmetic and load instructions whose results are unused.)
(Cherry-picked from branch backend-optim.)


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14686 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 09:31:18 +00:00
Xavier Leroy 452390e0ea Follow-up to commit 14673: MASM has its own syntax for hex constants
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14683 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-26 07:11:11 +00:00
Xavier Leroy 2633ff77ce Follow-up to commit 14673: Iconst_float now takes a float, no longer a string.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14675 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 14:02:43 +00:00
Xavier Leroy 29b34438e0 - Constant ropagation for float and int32/int64/nativeint arithmetic.
Constant propagation for floats can be turned off with option
  -no-float-const-prop, for codes that change FP rounding modes at
  run-time.
- Clambda / C-- / Mach: represent float constants as FP numbers of type 
  float rather than literals of type string.
- Tested for AMD64; other archs need testing.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14673 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-25 08:41:13 +00:00
Mark Shinwell cceb1c7361 fix regression (extraneous moves) caused by previous Cconst_blockheader patch
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14648 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-21 06:28:16 +00:00
Gabriel Scherer d74aa291d3 on i386 and AMD64, mark 'morally tail' C function calls as non-leaf
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14610 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-04-16 08:34:21 +00:00
Damien Doligez be92c8e70e fix msvc64 port by removing unused open Misc (untested, esp. on other Windows ports)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14501 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-27 15:06:28 +00:00
Mark Shinwell 583bfd46c2 be explicit when constructing integers that are block headers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14464 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2014-03-17 14:34:00 +00:00
Damien Doligez aa58e55958 port to cygwin-64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14337 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-12-03 14:43:02 +00:00
Benedikt Meurer 3bb161216b Perform constant optimizations for integer division and modulus on the C-- level.
This way we can avoid having to duplicate the same functionality for
every backend, and we may also benefit from other optimizations performed
during C-- generation.

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14303 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-19 07:01:54 +00:00
Alain Frisch f16534ef1a Reintegrate raise_variants branch.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14289 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-13 13:55:13 +00:00
Alain Frisch ff18f681bc #6042: fix msvc64 port.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14268 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-05 14:24:37 +00:00
Xavier Leroy e32b161074 Follow-up to commit r14254: update destroyed_at_oper and max_register_pressure
for immediate Idiv and Imod.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14255 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-01 17:05:21 +00:00
Xavier Leroy ab9f3e38fb PR#6042: optimize integer division and modulus when divisor is constant.
So far, implemented only for amd64.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@14254 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-11-01 16:35:54 +00:00
Alain Frisch 804007bfc5 Support for AMD64, Intel syntax (i.e. MVSC 64 port).
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14234 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-15 14:13:26 +00:00
Alain Frisch 164c307ae3 Support for raise variants in ocamlopt. Only amd64 for now.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/raise_variants@14226 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-10-14 14:33:27 +00:00
Fabrice Le Fessant 9b53f8b10d Re-add configure option -with-frame-pointers
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13738 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 18:03:59 +00:00
Fabrice Le Fessant 97bc1fa9e2 Reverting -with-frame-pointers
Fails to compile alt-ergo without frame-pointers. No time to debug
before tonight, so I revert and will merge again after fixing the
problem.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13732 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 06:29:33 +00:00
Fabrice Le Fessant 1b2667b9f2 Add -with-frame-pointers to ./configure
This option can be used to tell the native compiler that it should
update frame pointers, so that debuggers and profiling tools 
(especially Linux perf) can use them. For now, it is only supported
by the Unix/amd64 port.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13730 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-06-03 04:42:42 +00:00
Damien Doligez 0f6e0a35fb fix broken bswap on MSVC64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13653 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-05-07 09:36:53 +00:00
Gabriel Scherer 75b8c0184f PR#5933 type-specialize 'let compare = compare' on ints and strings
According to the reporter 'sliquister', type-specialized comparison
can nearly halve compilation time in some cases. This patch applies
type-specialization throughout the OCaml distribution sources, so not
all changes will have performance utility, but in this case I think
it's best to be consistent, as I see no downside to the change.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13410 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-19 07:22:12 +00:00
Damien Doligez c63f9e0957 fix a few problems with whitespace and over-long lines
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13393 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2013-03-09 22:38:52 +00:00
Benedikt Meurer 6fad047cc0 PR#5181: Merge common floating point constants in ocamlopt.
Instead of generating a unique quadword constant for each and every
floating point constant use within a function, we now collect the floating
point constants on a per-module basis, and generate only one quadword
per floating point constant.

This affects only the amd64 and i386 ports (both Unix/Linux/OS X and Windows).

git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-21 18:33:32 +00:00
Benedikt Meurer 45bc825115 Fix whitespace in emitted AMD64 code.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13144 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-12-20 10:37:55 +00:00
Fabrice Le Fessant 89bdc10350 PR#5774: Add bswap primitives for amd64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13106 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-29 09:55:00 +00:00
Fabrice Le Fessant ec7ac9cb3d PR#5771: Add primitives for reading 2, 4, 8 bytes in strings and bigarrays
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13087 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-09 16:15:29 +00:00
Fabrice Le Fessant d34a734947 PR#5795: Generate sqrtsd opcode instead of external call to sqrt on amd64
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13086 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-11-09 13:26:43 +00:00
Damien Doligez def31744f9 remove all $Id keywords
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@13013 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-10-15 17:50:56 +00:00
Xavier Leroy 9ac1d4937b PR#5707: in AMD64 port, exchange the roles of r10-r11 and r12-r13,
so that r10 and r11 are no longer used for parameter passing,
  and can therefore be destroyed by the dynamic loader without harm.
(Cherry-picked from version/4.00, commit 12907).


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12908 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-09-08 16:53:39 +00:00
Damien Doligez 997a678d5e clean up TABs and whitespace
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12799 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-30 18:04:46 +00:00
Fabrice Le Fessant f0eff81679 Merge commit 12664 from 4.00 on trunk/
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12665 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-07-09 08:46:10 +00:00
Alain Frisch 4ae32488d8 Fix unused open warning.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12502 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 12:32:54 +00:00
Alain Frisch a0a14c08fa Enable and fix more warnings.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12498 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-29 11:47:28 +00:00
Xavier Leroy ceabedc058 PR#5603: wrong .file directives generated by ocamlopt -g
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12449 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-05-12 09:51:45 +00:00
Xavier Leroy 79eab1a6e2 PR#5513: protect against min_int / -1 crashing on x86
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12187 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-24 10:13:02 +00:00
Xavier Leroy 2eecf2d4c0 PR#5487: addition of CFI directives and a few filename/linenumber info to generated amd64 and i386 assembly files.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12179 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-21 17:41:02 +00:00
Damien Doligez e7f5b858c2 More renaming to OCaml
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12149 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-10 16:15:24 +00:00
Benedikt Meurer 78e2ed88d8 [amd64] Don't override insert_op.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12122 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-04 10:00:09 +00:00
Benedikt Meurer fb327a7c2b Also pass Cmm.memory_chunk to select_addressing.
The rational behind this change is that for the ARM instruction sets, the
valid range for address offsets depends on the type of data being loaded
or stored.



git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12120 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2012-02-04 09:43:33 +00:00
Xavier Leroy ac0aa0778d PR#5179: giant steps towards a Mingw64 port.
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11927 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-21 16:31:01 +00:00
Xavier Leroy ca0c236919 PR#4869: rare collisions between assembly labels for code and data
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11887 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-18 10:00:56 +00:00
Xavier Leroy e10723e701 Merged proc_nt.ml into proc.ml in directories asmcomp/i386 and asmcomp/amd64.
This avoids much code duplication and is a baby step towards Mingw-64 bits 
support (PR#5179).  (There will be no need to create a third proc_xxx.ml
file for this configuration.)
Also, in amd64/emit_nt.mlp, the ml64 assembler didn't like my label subtractions, so I put the jumptable in code area instead of in data area.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11319 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-12-16 17:02:48 +00:00
Xavier Leroy 854afdd4e9 Reverted most of previous change re: local labels in AMD64/MacOSX.
The wretched MacOSX "ld -shared" (under 10.6 at least) balks on
subtracting two local labels, while it deigns subtracting two
nonlocal labels.


git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11224 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-15 09:44:07 +00:00
Xavier Leroy fc82a408a3 AMD64/MacOSX code generator: make local asm labels really local. (L100 instead of .L100)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@11221 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
2011-10-15 08:55:43 +00:00