libfirm
13 years agoPartly revert r28208 by using ir_printf with %zu format for size_t.
Michael Beck [Thu, 6 Jan 2011 01:49:00 +0000 (01:49 +0000)]
Partly revert r28208 by using ir_printf with %zu format for size_t.

[r28214]

13 years agoImproved the comment ... a bit.
Michael Beck [Thu, 6 Jan 2011 01:48:51 +0000 (01:48 +0000)]
Improved the comment ... a bit.

[r28213]

13 years agoEnable lc_printf and friends handling of j, t, and z length modifier.
Michael Beck [Thu, 6 Jan 2011 01:48:42 +0000 (01:48 +0000)]
Enable lc_printf and friends handling of j, t, and z length modifier.

Add a work-around for non-C99 MSCRT.

Use ir_printf now instead of printf.

[r28212]

13 years agofix irio not working correctly anymore after MacroBlocks were removed
Matthias Braun [Wed, 5 Jan 2011 17:28:45 +0000 (17:28 +0000)]
fix irio not working correctly anymore after MacroBlocks were removed

[r28210]

13 years agoavoid current_ir_graph in irio
Matthias Braun [Wed, 5 Jan 2011 17:28:43 +0000 (17:28 +0000)]
avoid current_ir_graph in irio

[r28209]

13 years agofix warnings about wrong format specifiers for size_t
Matthias Braun [Wed, 5 Jan 2011 17:28:39 +0000 (17:28 +0000)]
fix warnings about wrong format specifiers for size_t

[r28208]

13 years agoConstify.
Michael Beck [Tue, 28 Dec 2010 13:12:51 +0000 (13:12 +0000)]
Constify.

[r28204]

13 years agoReplaced magic constants by an enum.
Michael Beck [Tue, 28 Dec 2010 13:12:40 +0000 (13:12 +0000)]
Replaced magic constants by an enum.

[r28203]

13 years agoAdd and fix some comments.
Michael Beck [Tue, 28 Dec 2010 13:12:30 +0000 (13:12 +0000)]
Add and fix some comments.

[r28202]

13 years agoFixed typo.
Michael Beck [Tue, 28 Dec 2010 13:12:19 +0000 (13:12 +0000)]
Fixed typo.

[r28201]

13 years agoSwitch bitset.h/raw_bitset.h to size_t instead of unsigned size parameters.
Michael Beck [Mon, 27 Dec 2010 22:29:47 +0000 (22:29 +0000)]
Switch bitset.h/raw_bitset.h to size_t instead of unsigned size parameters.

Note that this is an ugly change because ALL index variables used inside
bitset_foreach() MUST be switched to size_t now, or the magical

elm != (size_t) -1;

will fail :-(

[r28199]

13 years agoFixed warning because of wrong type.
Michael Beck [Mon, 27 Dec 2010 22:29:27 +0000 (22:29 +0000)]
Fixed warning because of wrong type.

[r28198]

13 years agoRemoved yet unused variable.
Michael Beck [Wed, 22 Dec 2010 00:54:33 +0000 (00:54 +0000)]
Removed yet unused variable.

[r28197]

13 years agoFixed some 64bit warnings by using size_t and fixing compare functions.
Michael Beck [Wed, 22 Dec 2010 00:54:22 +0000 (00:54 +0000)]
Fixed some 64bit warnings by using size_t and fixing compare functions.

[r28196]

13 years agoAdd support for Win64.
Michael Beck [Tue, 21 Dec 2010 02:09:06 +0000 (02:09 +0000)]
Add support for Win64.

[r28195]

13 years agoFixed some 64bit warnings by using size_t instead of unsigned.
Michael Beck [Tue, 21 Dec 2010 02:08:57 +0000 (02:08 +0000)]
Fixed some 64bit warnings by using size_t instead of unsigned.

[r28194]

13 years agoObstack: Deleted the special windows version, make Win64 warning free.
Michael Beck [Tue, 21 Dec 2010 02:08:45 +0000 (02:08 +0000)]
Obstack: Deleted the special windows version, make Win64 warning free.

Use PTR_INT_TYPE instead of long which is 32bit on Win64.

[r28193]

13 years agomake verifier independent of current_ir_graph
Matthias Braun [Wed, 15 Dec 2010 11:38:19 +0000 (11:38 +0000)]
make verifier independent of current_ir_graph

[r28189]

13 years agofurther extend API so parallel construction of multiple graphs is possible
Matthias Braun [Wed, 15 Dec 2010 11:38:15 +0000 (11:38 +0000)]
further extend API so parallel construction of multiple graphs is possible

[r28188]

13 years agoRemoved the arch_register_type_is() macro.
Michael Beck [Mon, 6 Dec 2010 19:01:56 +0000 (19:01 +0000)]
Removed the arch_register_type_is() macro.

Only makes it hard to search for arch_register_type_* flags.

[r28185]

13 years agoFixed memory leak, fixed some typos, add some doxygen docu.
Michael Beck [Mon, 6 Dec 2010 09:52:31 +0000 (09:52 +0000)]
Fixed memory leak, fixed some typos, add some doxygen docu.

[r28184]

13 years agoRestored somehow lost AMD Family 11h support.
Michael Beck [Mon, 6 Dec 2010 09:09:05 +0000 (09:09 +0000)]
Restored somehow lost AMD Family 11h support.

[r28183]

13 years agoImproved native detection further.
Michael Beck [Sat, 4 Dec 2010 11:20:04 +0000 (11:20 +0000)]
Improved native detection further.

- split out cmov and popcnt feature, can be detected by cpuid
- use feature flags even if not intel or amd cpu
- p6 instructions cannot be detected by feature bit, set them on
  architecture detection
- detect old Geode

[r28182]

13 years agoImproved AMD detection.
Michael Beck [Sat, 4 Dec 2010 10:20:27 +0000 (10:20 +0000)]
Improved AMD detection.

[r28181]

13 years agoInstead of panic() offer the native option only if running on x86 xpu.
Michael Beck [Sat, 4 Dec 2010 09:26:10 +0000 (09:26 +0000)]
Instead of panic() offer the native option only if running on x86 xpu.

[r28180]

13 years agoNative detection works on 32 and 64bit x86 cpus yet.
Michael Beck [Sat, 4 Dec 2010 09:21:36 +0000 (09:21 +0000)]
Native detection works on 32 and 64bit x86 cpus yet.

Allowed native 32bit code generation when running on 64bit x86.
Removed ebx save, gcc should handle this.
Enable native detection on windows again.

[r28179]

13 years agoautodetection is only possible when compiling for an x86 machine
Matthias Braun [Fri, 3 Dec 2010 08:36:48 +0000 (08:36 +0000)]
autodetection is only possible when compiling for an x86 machine

[r28177]

13 years agomake Makefile robust against deleted headers
Matthias Braun [Wed, 1 Dec 2010 13:55:01 +0000 (13:55 +0000)]
make Makefile robust against deleted headers

[r28176]

13 years agocallback typedef not needed anymore
Matthias Braun [Wed, 1 Dec 2010 13:25:41 +0000 (13:25 +0000)]
callback typedef not needed anymore

[r28175]

13 years agobe_lower_for_target is now a simple function in the public API
Matthias Braun [Wed, 1 Dec 2010 13:11:29 +0000 (13:11 +0000)]
be_lower_for_target is now a simple function in the public API

[r28172]

13 years agouse a 'low-tech' solution for emitting 8- and 16-bit register names. This also fixes...
Matthias Braun [Wed, 1 Dec 2010 10:32:05 +0000 (10:32 +0000)]
use a 'low-tech' solution for emitting 8- and 16-bit register names. This also fixes a recently introduced bug in ia32_build_8bit_reg_map_high

[r28168]

13 years agocreate new_tarval_from_long_double function and change argument of new_tarval_from_do...
Matthias Braun [Wed, 1 Dec 2010 10:32:03 +0000 (10:32 +0000)]
create new_tarval_from_long_double function and change argument of new_tarval_from_double to double - so bindings can get away with C89 types only

[r28167]

13 years agoFixed new_d_defaultProj(), handle Bad predecessor.
Michael Beck [Mon, 29 Nov 2010 21:00:50 +0000 (21:00 +0000)]
Fixed new_d_defaultProj(), handle Bad predecessor.

[r28166]

13 years agoUpdated and fixed "native" support.
Michael Beck [Fri, 26 Nov 2010 02:17:57 +0000 (02:17 +0000)]
Updated and fixed "native" support.

- add support for MSVC compiler
- fixed cpuid toggle code
- fixed wrong ussage of feature mask register
- detect atom, core2, K10
- removed panics ...

Probably the whole detection code should be either moved into the frontend
OR at least into some extra file, so it can be reused for the amd64 and the
upcoming new x86 backends.

[r28160]

13 years agoCode cleanup
Andreas Zwinkau [Thu, 25 Nov 2010 14:03:43 +0000 (14:03 +0000)]
Code cleanup

Results of review by Mallon

[r28156]

13 years agoAMD autodetection extended
Andreas Zwinkau [Thu, 25 Nov 2010 10:13:03 +0000 (10:13 +0000)]
AMD autodetection extended

[r28155]

13 years agoAdd -march=native parameter
Andreas Zwinkau [Thu, 25 Nov 2010 10:13:02 +0000 (10:13 +0000)]
Add -march=native parameter

[r28154]

13 years agoallow specification of dll-extension
Matthias Braun [Tue, 23 Nov 2010 06:37:01 +0000 (06:37 +0000)]
allow specification of dll-extension

[r28153]

13 years agoremove strange init_once/inited checks from arch_init functions. Calling it twice...
Matthias Braun [Tue, 23 Nov 2010 06:37:00 +0000 (06:37 +0000)]
remove strange init_once/inited checks from arch_init functions. Calling it twice is invalid (and crashs anyway)

[r28152]

13 years agoSimplified code, decrease register pressure, add some doxygen docu.
Michael Beck [Sun, 21 Nov 2010 10:44:47 +0000 (10:44 +0000)]
Simplified code, decrease register pressure, add some doxygen docu.

[r28149]

13 years agoAdd some doxygen docu.
Michael Beck [Sun, 21 Nov 2010 10:44:34 +0000 (10:44 +0000)]
Add some doxygen docu.

[r28148]

13 years agoTurn while loop into do-while, we know it will be executed at least once.
Michael Beck [Sun, 21 Nov 2010 10:25:02 +0000 (10:25 +0000)]
Turn while loop into do-while, we know it will be executed at least once.

[r28147]

13 years agoReplaced pmaps used for 16 and 8bit register names by simple array lookups.
Michael Beck [Fri, 19 Nov 2010 21:57:41 +0000 (21:57 +0000)]
Replaced pmaps used for 16 and 8bit register names by simple array lookups.

[r28146]

13 years agoAdd some doxygen docu.
Michael Beck [Fri, 19 Nov 2010 21:57:24 +0000 (21:57 +0000)]
Add some doxygen docu.

[r28145]

13 years agoPut definition of get_base_sc() into .c file to remove the (non-standard) inline...
Michael Beck [Wed, 17 Nov 2010 23:17:02 +0000 (23:17 +0000)]
Put definition of get_base_sc() into .c file to remove the (non-standard) inline specifier from official header.

Most users of this function are inside teh same c file, so the performance hit is small.

[r28144]

13 years agoFixed indentation of generated code.
Michael Beck [Wed, 17 Nov 2010 23:16:49 +0000 (23:16 +0000)]
Fixed indentation of generated code.

[r28143]

13 years agoUse the same constants for register flags as the ia32 spec.
Michael Beck [Wed, 17 Nov 2010 23:16:37 +0000 (23:16 +0000)]
Use the same constants for register flags as the ia32 spec.

[r28142]

13 years agoadd entity_has_ld_ident function
Matthias Braun [Wed, 17 Nov 2010 12:00:07 +0000 (12:00 +0000)]
add entity_has_ld_ident function

[r28141]

13 years agoFixed windows build: unistd.h is not a portable header ...
Michael Beck [Sun, 14 Nov 2010 00:43:50 +0000 (00:43 +0000)]
Fixed windows build: unistd.h is not a portable header ...

[r28140]

13 years agoPrefix global entities from the ia32 backend with ia32_ to prevent (future) collisitions.
Michael Beck [Sun, 14 Nov 2010 00:38:33 +0000 (00:38 +0000)]
Prefix global entities from the ia32 backend with ia32_ to prevent (future) collisitions.

[r28139]

13 years agoBetter fix for __attibute__ usage, this is a GCC feature.
Michael Beck [Mon, 8 Nov 2010 08:53:35 +0000 (08:53 +0000)]
Better fix for __attibute__ usage, this is a GCC feature.

[r28137]

13 years agoFixed Windows build: Don't use __attribute__ in header files directly ...
Michael Beck [Mon, 8 Nov 2010 08:13:03 +0000 (08:13 +0000)]
Fixed Windows build: Don't use __attribute__ in header files directly ...

[r28136]

13 years agoupdate gitignore
Matthias Braun [Fri, 5 Nov 2010 15:20:36 +0000 (15:20 +0000)]
update gitignore

[r28134]

13 years agoa firm Makefile
Matthias Braun [Fri, 5 Nov 2010 13:25:09 +0000 (13:25 +0000)]
a firm Makefile

[r28133]

13 years agoremove some more strange HAVE_ #ifdefs
Matthias Braun [Fri, 5 Nov 2010 13:25:08 +0000 (13:25 +0000)]
remove some more strange HAVE_ #ifdefs

[r28132]

13 years agoremove obsolete/unused debug stuff in ADTs
Matthias Braun [Fri, 5 Nov 2010 13:25:07 +0000 (13:25 +0000)]
remove obsolete/unused debug stuff in ADTs

[r28131]

13 years agofix for c++ commit
Matthias Braun [Thu, 4 Nov 2010 13:53:41 +0000 (13:53 +0000)]
fix for c++ commit

[r28130]

13 years agocompile as C++ in msvc
Matthias Braun [Thu, 4 Nov 2010 12:15:34 +0000 (12:15 +0000)]
compile as C++ in msvc

[r28128]

13 years agomake firm compilable with a c++ compiler
Matthias Braun [Thu, 4 Nov 2010 12:15:30 +0000 (12:15 +0000)]
make firm compilable with a c++ compiler

[r28127]

13 years agoRemove the unused functions print_firm_kind() and firm_identify_thing().
Matthias Braun [Thu, 4 Nov 2010 12:15:24 +0000 (12:15 +0000)]
Remove the unused functions print_firm_kind() and firm_identify_thing().

[r28126]

13 years agoremove unused seqnumbers modules
Matthias Braun [Thu, 4 Nov 2010 12:15:24 +0000 (12:15 +0000)]
remove unused seqnumbers modules

[r28125]

13 years agoremove set_.*_member type functions, as you can too easily violate the owner <->...
Matthias Braun [Thu, 28 Oct 2010 12:37:54 +0000 (12:37 +0000)]
remove set_.*_member type functions, as you can too easily violate the owner <-> member relationship

[r28120]

13 years agoGit wants to change line endings for those ...
Michael Beck [Wed, 27 Oct 2010 21:48:27 +0000 (21:48 +0000)]
Git wants to change line endings for those ...

[r28119]

13 years agoFixed typo.
Michael Beck [Wed, 27 Oct 2010 21:48:20 +0000 (21:48 +0000)]
Fixed typo.

[r28118]

13 years agolet Bad and NoMem nodes get automatically generated
Matthias Braun [Wed, 13 Oct 2010 14:56:03 +0000 (14:56 +0000)]
let Bad and NoMem nodes get automatically generated

[r28116]

13 years agoia32: fix intrinsics on mac
Matthias Braun [Tue, 12 Oct 2010 22:08:27 +0000 (22:08 +0000)]
ia32: fix intrinsics on mac

[r28111]

13 years agoAPI stripping
Andreas Zwinkau [Tue, 12 Oct 2010 10:35:33 +0000 (10:35 +0000)]
API stripping

All removed functions had no implementation.

[r28105]

13 years agoRemoved API function opt_loopunroll_pass
Andreas Zwinkau [Tue, 12 Oct 2010 10:25:56 +0000 (10:25 +0000)]
Removed API function opt_loopunroll_pass

Implementation already removed before

[r28104]

13 years agocleanup ir_spec and let the script generate Start,End and Sync now
Matthias Braun [Mon, 11 Oct 2010 16:52:36 +0000 (16:52 +0000)]
cleanup ir_spec and let the script generate Start,End and Sync now

[r28097]

13 years agoRemove set_opt_optimize_class_casts declaration from API
Andreas Zwinkau [Mon, 11 Oct 2010 15:00:10 +0000 (15:00 +0000)]
Remove set_opt_optimize_class_casts declaration from API

The implementation was already deleted before

[r28096]

13 years agoUpdate ir_spec for JNA direct-mode in jFirm
Andreas Zwinkau [Mon, 11 Oct 2010 12:56:51 +0000 (12:56 +0000)]
Update ir_spec for JNA direct-mode in jFirm

[r28095]

13 years agomake libfirm work with strings being const char*
Matthias Braun [Mon, 11 Oct 2010 12:02:14 +0000 (12:02 +0000)]
make libfirm work with strings being const char*

[r28090]

13 years agoSmall improvement: lower a double word x << 1 into x + x, saves one instruction on...
Michael Beck [Fri, 8 Oct 2010 21:44:42 +0000 (21:44 +0000)]
Small improvement: lower a double word x << 1 into x + x, saves one instruction on x86 ...

[r28086]

13 years agoAllow 64bit Leas (2 shifts and 1 add)
Michael Beck [Fri, 8 Oct 2010 21:28:23 +0000 (21:28 +0000)]
Allow 64bit Leas (2 shifts and 1 add)

[r28085]

13 years agoWhen lowering a double word shift, always conv the right operand to lower_unsigned...
Michael Beck [Fri, 8 Oct 2010 21:26:23 +0000 (21:26 +0000)]
When lowering a double word shift, always conv the right operand to lower_unsigned mode.

[r28084]

13 years agoExperimental support for double word irarch.
Michael Beck [Fri, 8 Oct 2010 20:51:37 +0000 (20:51 +0000)]
Experimental support for double word irarch.

include/libfirm/irarch.h
- give the mode to the eval function

ir/be/ia32/bearch_ia32.c
- the maximum allowed shift is 63 (for double-word shifts) on x86, not 31

ir/be/ia32/ia32_architecture.c
ir/be/ia32/ia32_architecture.h
- estimate the cost for 64bit operations

ir/ir/irarch.c
- pass the mode

[r28081]

13 years agoAdd missing type kind.
Michael Beck [Fri, 8 Oct 2010 20:22:57 +0000 (20:22 +0000)]
Add missing type kind.

[r28080]

13 years agoRemove the now unused function get_Proj_type().
Matthias Braun [Fri, 8 Oct 2010 19:51:54 +0000 (19:51 +0000)]
Remove the now unused function get_Proj_type().

[r28079]

13 years agoFixed typo.
Michael Beck [Fri, 8 Oct 2010 19:31:00 +0000 (19:31 +0000)]
Fixed typo.

[r28077]

13 years agoMoved enum into firm_types, fixed some typos.
Michael Beck [Fri, 8 Oct 2010 19:29:19 +0000 (19:29 +0000)]
Moved enum into firm_types, fixed some typos.

[r28076]

13 years agoMoved functions from opt_confirms.h into official header, do edgjfe can use them.
Michael Beck [Fri, 8 Oct 2010 19:20:35 +0000 (19:20 +0000)]
Moved functions from opt_confirms.h into official header, do edgjfe can use them.

[r28075]

13 years agoC99 feature removed.
Michael Beck [Fri, 8 Oct 2010 18:51:59 +0000 (18:51 +0000)]
C99 feature removed.

[r28074]

13 years agomake sparc+arm backend completely independent from beabi
Matthias Braun [Fri, 8 Oct 2010 14:02:22 +0000 (14:02 +0000)]
make sparc+arm backend completely independent from beabi

[r28073]

13 years agobackend: put ignore regs into beirg
Matthias Braun [Fri, 8 Oct 2010 14:02:20 +0000 (14:02 +0000)]
backend: put ignore regs into beirg

[r28072]

13 years agobackend: cleanup queries for ignore regs
Matthias Braun [Fri, 8 Oct 2010 14:02:19 +0000 (14:02 +0000)]
backend: cleanup queries for ignore regs

[r28071]

13 years agosparc: support mode_b lowering
Matthias Braun [Fri, 8 Oct 2010 14:02:17 +0000 (14:02 +0000)]
sparc: support mode_b lowering

[r28070]

13 years agosparc: implement omit-fp mode
Matthias Braun [Fri, 8 Oct 2010 14:02:16 +0000 (14:02 +0000)]
sparc: implement omit-fp mode

[r28069]

13 years agosparc: model restore as explicit node, refactor Save node
Matthias Braun [Fri, 8 Oct 2010 14:02:15 +0000 (14:02 +0000)]
sparc: model restore as explicit node, refactor Save node

[r28068]

13 years agosparc: crude implementation of float Unknown
Matthias Braun [Fri, 8 Oct 2010 14:02:13 +0000 (14:02 +0000)]
sparc: crude implementation of float Unknown

[r28067]

13 years agorename tarval to ir_tarval
Matthias Braun [Fri, 8 Oct 2010 13:36:56 +0000 (13:36 +0000)]
rename tarval to ir_tarval

[r28062]

13 years agofix wrong types
Matthias Braun [Fri, 8 Oct 2010 13:36:53 +0000 (13:36 +0000)]
fix wrong types

[r28061]

13 years agofix invalid double definition of irg_extblk_info_state
Matthias Braun [Fri, 8 Oct 2010 13:36:52 +0000 (13:36 +0000)]
fix invalid double definition of irg_extblk_info_state

[r28060]

13 years agoimproved and completely automatic vc2010 projectfile updater
Matthias Braun [Fri, 8 Oct 2010 13:36:51 +0000 (13:36 +0000)]
improved and completely automatic vc2010 projectfile updater

[r28059]

13 years agowin32 version of obstack_printf
Matthias Braun [Fri, 8 Oct 2010 13:36:50 +0000 (13:36 +0000)]
win32 version of obstack_printf

[r28058]

13 years agoremove rbitset_w_size type functions: a raw_bitset with a size is a bitset_t
Matthias Braun [Fri, 8 Oct 2010 13:36:50 +0000 (13:36 +0000)]
remove rbitset_w_size type functions: a raw_bitset with a size is a bitset_t

[r28057]

13 years agoadapt current_ir_graph in irg_walk
Matthias Braun [Fri, 8 Oct 2010 13:36:49 +0000 (13:36 +0000)]
adapt current_ir_graph in irg_walk

[r28056]

13 years agolower_dw: refactor to use a smart walk strategy and factoring out some common code...
Matthias Braun [Fri, 8 Oct 2010 13:36:48 +0000 (13:36 +0000)]
lower_dw: refactor to use a smart walk strategy and factoring out some common code to get a node_entry

[r28055]

13 years agolower_dw: Remove RotL special case, normal code produces the same result
Matthias Braun [Fri, 8 Oct 2010 13:36:48 +0000 (13:36 +0000)]
lower_dw: Remove RotL special case, normal code produces the same result

[r28054]

13 years agolower_dw: remove pointless comments at end of {}
Matthias Braun [Fri, 8 Oct 2010 13:36:47 +0000 (13:36 +0000)]
lower_dw: remove pointless comments at end of {}

[r28053]

13 years agolower_dw: irn_idxs are unsigned not int
Matthias Braun [Fri, 8 Oct 2010 13:36:46 +0000 (13:36 +0000)]
lower_dw: irn_idxs are unsigned not int

[r28052]