summaryrefslogtreecommitdiff
path: root/erts/emulator/utils
Commit message (Collapse)AuthorAgeFilesLines
* Sort keys before generatingLukas Larsson2014-11-281-1/+1
| | | | | This has to be done in order to consistently generate the same file so that we do not get rebuilds all the time.
* erts: Add cflags, ldflags and config.h into executableLukas Larsson2013-07-111-0/+87
|
* Remove surplus echosLukas Larsson2013-02-141-2/+1
|
* Include git sha in prompt if availableLukas Larsson2013-02-131-0/+40
| | | | | | | The sha will only be included if there is no tag starting with OTP_R* associated with the sha. This is because we do not want the sha to show on offical releases.
* Update copyright yearsBjörn-Egil Dahlberg2013-01-251-1/+1
|
* beam_makeops: Turn on warnings and eliminate existing warningsBjörn Gustavsson2012-10-221-9/+10
|
* beam_makeops: Eliminate a deprecation warningBjörn Gustavsson2012-10-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Perl 5.16.1 (and perhaps other versions) issues the following warning: defined(@array) is deprecated at utils/beam_makeops line 1714. (Maybe you should just omit the defined()?) for the following line: $prev_last = pop(@{$gen_transform{$key}}) if defined @{$gen_transform{$key}}; # LINE 1714 The documentation for "defined" says that its use on hashes and arrays is deprecated and that it may stop working in a future release. Simply removing "defined" (as suggested by the warning message) will not work, as there will be an error when trying to use an undefined value as an array reference: Can't use an undefined value as an ARRAY reference at utils/beam_makeops line 1714. What we must do is to check whether $gen_transform{$key} is defined before trying to use it as an array reference. Noticed-by: Tuncer Ayaz
* Merge branch 'maint'Björn-Egil Dahlberg2012-08-311-1/+1
|\ | | | | | | | | | | Conflicts: lib/diameter/autoconf/vxworks/sed.general xcomp/README.md
| * Update copyright yearsBjörn-Egil Dahlberg2012-08-311-1/+1
| |
* | Merge branch 'maint'Björn Gustavsson2012-08-271-0/+1
|\ \ | |/ | | | | | | * maint: make_preload: Don't fail if Perl's default file encoding is UTF-8
| * make_preload: Don't fail if Perl's default file encoding is UTF-8Björn Gustavsson2012-08-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Setting Perl's default encoding for files to UTF-8, for example like this: PERL_UNICODE=DS make would crash the build with a message similar to: form size 1413 greater than size 1237 of module at utils/make_preload line 175, <FILE> chunk 1. Tell Perl to interpret the data in BEAM files as binary by using the binmode() function. The binmode() function existed before Unicode support was added to Perl, which means that make_preload should work even in old versions of Perl. Noticed-by: Aaron Harnly
* | Don't go to single-scheduler mode when managing breakpointsBjörn Gustavsson2012-06-251-2/+0
|/ | | | | | | | | | | Calls to erlang:set_trace_pattern/3 will no longer block all other schedulers. We will still go to single-scheduler mode when new code is loaded for a module that is traced, or when loading code when there is a default trace pattern set. That is not impossible to fix, but that requires much closer cooperation between tracing BIFs and the loader BIFs.
* Update copyright yearsBjörn-Egil Dahlberg2012-03-301-1/+1
|
* beam_makeops: Add a simple preprocessorBjörn Gustavsson2012-03-221-2/+52
|
* Update copyright yearsBjörn-Egil Dahlberg2011-12-091-1/+1
|
* Build Win64 Erlang emulator using MSYSunknown2011-12-021-1/+9
| | | | Still does not run, just compiles.
* Change the calling convention for BIFsBjörn Gustavsson2011-10-261-34/+5
| | | | | | | | | | The current calling convention for BIFs makes it necessary to handle each arity specially, since each argument for the BIF also becomes an argument for the C function implementing the BIF, which makes it hard to allow BIFs with any number of arguments. Change the calling convention for BIFs, so that BIF arguments are passed in an array to the C function implementing the BIF.
* make_preload: Don't output a C comment start inside a commentBjörn Gustavsson2011-10-131-0/+1
| | | | | | | | We already avoid outputting a comment terminator ("*/") inside a comment to avoid causing a syntax error. Also avoid outputting the start of a comment ("/*") to avoid causing a compiler warning. Noticed-by: Tuncer Ayaz
* Print transformtions sorted on the name of the first instructionBjörn Gustavsson2011-10-111-1/+1
|
* Share code for call of predicate and transformation functionsBjörn Gustavsson2011-10-111-10/+22
|
* Introduce 'try_me_else_fail'Björn Gustavsson2011-10-111-1/+20
|
* Combine 'store_var' with 'next_arg'Björn Gustavsson2011-10-111-2/+2
| | | | 'store_var' is always followed by 'next_arg'.
* Merge 'next_instr' and 'is_op' into 'next_instr'Björn Gustavsson2011-10-111-7/+4
| | | | 'next_instr' is always followed by 'is_op'.
* Merge 'new_instr' and 'store_op' into 'new_instr'Björn Gustavsson2011-10-111-3/+2
| | | | | | | | Since the 'new_instr' instruction always occurs before the 'store_op' instruction, we can merge the instructions into one. Also, there is no need to include the arity of the BEAM instruction as an operand, since the arity can be looked up based on the opcode.
* Combine a 'call' instruction with the following 'end' instructionBjörn Gustavsson2011-10-111-2/+3
| | | | | | A 'call' instruction in the loader transformation language is always followed by an 'end' instruction, so we can replace the 'call' instruction with a 'call_end' instruction.
* Get rid of redundant 'try_me_else' and 'fail' instructionsBjörn Gustavsson2011-10-111-6/+37
| | | | | | | | | | If the left part of a transformation will always match, omit the the 'try_me_else' and 'fail' instructions. As part of this optimization, make it an error to have a transformation that can never be reached because of a previous transformation that will always match. (Remove one transformation from ops.tab that was found to be unreachable.)
* Add some more information in instruction commentsBjörn Gustavsson2011-10-111-2/+3
|
* In transformations, don't store variables that are never usedBjörn Gustavsson2011-10-111-4/+53
| | | | | This optimization will save some space (in the loader tables) and some loading time.
* Remove redundant 'next_arg' before 'next_instr'Björn Gustavsson2011-10-111-1/+2
| | | | | Fix the incorrect code that attempted to remove a single 'next_arg' instructions before 'next_instr'.
* Generalize and rename is_set_var_instr() to is_instr()Björn Gustavsson2011-10-111-5/+5
| | | | | It is more useful to have a helper function that can test for any instruction.
* Update copyright yearsBjörn-Egil Dahlberg2011-09-291-1/+1
|
* beam_load.c: Add overflow check of tag valuesBjörn Gustavsson2011-08-031-1/+1
| | | | | | | | | | | | | | | | | | | | The handling of large values for other tags than TAG_i (integer) is buggy. Any tag value equal to or greater than 2^40 (5 bytes) will abort loading. Tag values fitting in 5 bytes will be truncated to 4 bytes values. Those bugs cause real problems because the bs_init2/6 and bs_init_bits/6 instructions unfortunately use TAG_u to encode literal sizes (using TAG_i would have been a better choice, but it is too late to change that now). Any binary size that cannot fit in an Uint should cause a system_limit exception at run-time, but instead the buggy handling will either cause an emulator crash (for values in the range 2^32 to 2^40-1) or abort loading. In this commit, implement overflow checking of tag values as a preparation for fixing the binary construction instructions. If any tag value cannot fit in an Uint (except for TAG_i), change the tag to the special TAG_o overflow tag.
* beam_makeops: Add some sanity checksBjörn Gustavsson2011-08-031-17/+52
| | | | | | | We want to make sure that a tag/type name is not defined more than once and that we don't define too many primitive tags. Primitive tags must be named with lowercase letters (or they will be confused with variable names in transformations in the ops.tab file).
* Fixed end date in copyright note.Micael Karlberg2011-02-281-1/+1
|
* Add the erts/emulator/utils/loaded scriptBjörn Gustavsson2011-02-261-0/+44
|
* beam_makeops: Support jumping to common code from an instruction macroBjörn Gustavsson2011-01-171-0/+8
|
* Support packing of the 'I' type in a 64-bit emulatorBjörn Gustavsson2011-01-171-5/+27
| | | | | In many (not all) cases, the value for the 'I' type will fit into 32 bits.
* beam_makeops: Refactor packing code to facilitate extensionsBjörn Gustavsson2011-01-171-6/+9
| | | | We don't want the packable types listed in two places.
* BEAM loader: Pack more instructions using a new 'Q' typeBjörn Gustavsson2011-01-171-3/+6
| | | | | Introduce a new 'Q' type, similar to 'P' except that it can be packed.
* If the wordsize is 64 bits, pack up to 4 operands into a wordBjörn Gustavsson2011-01-171-1/+16
| | | | | | | | | | In the 32-bit BEAM emulator, it is only possible to pack 3 register operands into one word. Therefore, the move2 instruction (that has 4 operands) needs two words for its operands. Take advantage of the larger wordsize in the 64-bit emulator and pack up to 4 operands into a single word.
* Pass the external word size to the beam_makeops scriptBjörn Gustavsson2011-01-171-0/+2
| | | | | | Giving the beam_makeops script access to the external word size (=the size of instruction words) will allow it to pack more operands into a word for the 64 bits emulator.
* BEAM loader: Combine is_type/1 and is_eq/1 instructionsBjörn Gustavsson2011-01-171-1/+7
| | | | | | | In the transformation engine in the loader, an is_eq/1 instruction is currently always preceded by an is_type/1 instruction. Therefore, save a word and slight amount of time by combining those instructions into an is_type_eq/2 instruction.
* BEAM loader: Omit type tests for instructions that don't need themBjörn Gustavsson2011-01-171-6/+15
|
* beam_makeops: Allow -pack and -nonext to be combinedBjörn Gustavsson2011-01-171-1/+4
|
* beam_makeops: Relax requirements for having specific instructionsBjörn Gustavsson2011-01-171-1/+8
|
* Add utils/count for counting the static instruction frequencyBjörn Gustavsson2011-01-171-0/+127
|
* Merge branch 'pan/otp_8332_halfword' into devErlang/OTP2010-03-222-19/+23
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * pan/otp_8332_halfword: Teach testcase in driver_suite the new prototype for driver_async wx: Correct usage of driver callbacks from wx thread Adopt the new (R13B04) Nif functionality to the halfword codebase Support monitoring and demonitoring from driver threads Fix further test-suite problems Correct the VM to work for more test suites Teach {wordsize,internal|external} to system_info/1 Make tracing and distribution work Turn on instruction packing in the loader and virtual machine Add the BeamInstr data type for loaded BEAM code Fix the BEAM dissambler for the half-word emulator Store pointers to heap data in 32-bit words Add a custom mmap wrapper to force heaps into the lower address range Fit all heap data into the 32-bit address range
| * Turn on instruction packing in the loader and virtual machinePatrik Nyblom2010-03-101-7/+10
| |
| * Store pointers to heap data in 32-bit wordsPatrik Nyblom2010-03-102-9/+10
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store Erlang terms in 32-bit entities on the heap, expanding the pointers to 64-bit when needed. This works because all terms are stored on addresses in the 32-bit address range (the 32 most significant bits of pointers to term data are always 0). Introduce a new datatype called UWord (along with its companion SWord), which is an integer having the exact same size as the machine word (a void *), but might be larger than Eterm/Uint. Store code as machine words, as the instructions are pointers to executable code which might reside outside the 32-bit address range. Continuation pointers are stored on the 32-bit stack and hence must point to addresses in the low range, which means that loaded beam code much be placed in the low 32-bit address range (but, as said earlier, the instructions themselves are full words). No Erlang term data can be stored on C stacks (enforced by an earlier commit). This version gives a prompt, but test cases still fail (and dump core). The loader (and emulator loop) has instruction packing disabled. The main issues has been in rewriting loader and actual virtual machine. Subsystems (like distribution) does not work yet.
* beam_makepos: Do not put any dates in generated filesBjörn Gustavsson2009-12-091-2/+2
| | | | | | We don't want to have dates in files that are checked-in as part of the bootstrap compiler (such as beam_opcodes.{erl,hrl}) as a new version will be created every time.