Browse Source

Merge pull request #2162 from svaarala/link-arm-mixed-endian

Add a link for legacy ARM mixed endian (FPA)
pull/2152/head
Sami Vaarala 5 years ago
committed by GitHub
parent
commit
4781b33420
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      config/config-options/DUK_USE_BYTEORDER.yaml
  2. 7
      src-input/duk_dblunion.h
  3. 4
      website/guide/duktapebuiltins.html

2
config/config-options/DUK_USE_BYTEORDER.yaml

@ -9,7 +9,7 @@ description: >
ARM mixed endian means integers are little endian but IEEE doubles have
mixed endianness: big endian bytes 12345678 are ordered in memory as
43218765.
43218765. See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/Bcfhgcgd.html.
(This define should be produced by duk_config.h; currently Duktape internals
use automatically derived defines DUK_USE_{INTEGER,DOUBLE}_{LE,BE_ME}

7
src-input/duk_dblunion.h

@ -26,13 +26,14 @@
*
* A B C D E F G H Big endian (e.g. 68k) DUK_USE_DOUBLE_BE
* H G F E D C B A Little endian (e.g. x86) DUK_USE_DOUBLE_LE
* D C B A H G F E Mixed/cross endian (e.g. ARM) DUK_USE_DOUBLE_ME
* D C B A H G F E Mixed endian (e.g. ARM FPA) DUK_USE_DOUBLE_ME
*
* ARM is a special case: ARM double values are in mixed/cross endian
* format while ARM duk_uint64_t values are in standard little endian
* Legacy ARM (FPA) is a special case: ARM double values are in mixed
* endian format while ARM duk_uint64_t values are in standard little endian
* format (H G F E D C B A). When a double is read as a duk_uint64_t
* from memory, the register will contain the (logical) value
* E F G H A B C D. This requires some special handling below.
* See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/Bcfhgcgd.html.
*
* Indexes of various types (8-bit, 16-bit, 32-bit) in memory relative to
* the logical (big endian) order:

4
website/guide/duktapebuiltins.html

@ -150,6 +150,10 @@ ll u n p2 a4 x64 linux gcc // l|b|m integer endianness, l|b|m IEEE double en
// gcc|clang|msvc|etc: compiler
</pre>
<p>For endianness, "l" stands for little endian, "b" for big endian, and "m"
for mixed endian (legacy ARM devices, see e.g.
<a href="http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0056d/Bcfhgcgd.html">The FPA architecture</a>).</p>
<h3 id="builtin-duktape-fin">fin()</h3>
<p>When called with a single argument, gets the current finalizer of an object:</p>

Loading…
Cancel
Save