Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- E.g, the first three entries of lookup_table in lib/std/fmt/errol/lookup.zig:
- pub const lookup_table = [_]HP{
- HP{ .val = 1.000000e+308, .off = -1.097906362944045488e+291 },
- HP{ .val = 1.000000e+307, .off = 1.396894023974354241e+290 },
- HP{ .val = 1.000000e+306, .off = -1.721606459673645508e+289 },
- This compiles down to the following (correct) assembly when cross-built on
- an x64 machine using `-target sparcv9-linux-gnu`:
- lookup_table:
- .xword 0x7fe1ccf385ebc8a0 ! double 1.0E+308
- .xword 0xfc5c2a3c3d855605 ! double -1.0979063629440455E+291
- .xword 0x7fac7b1f3cac7433 ! double 9.9999999999999999E+306
- .xword 0x7c2cab0301fbbb2f ! double 1.3968940239743542E+290
- .xword 0x7f76c8e5ca239029 ! double 1.0E+306
- .xword 0xfbfc43fd98036a41 ! double -1.7216064596736455E+289
- But compiles down to the wrong values when built natively on a sparc64 machine:
- lookup_table:
- .xword 0x46f1ccf385ebc8a0 ! double 5.7766220027674547E+33
- .xword 0xc6fc2a3c3d855605 ! double -9.1400591232411468E+33
- .xword 0x46fc7b1f3cac7433 ! double 9.2425952044279273E+33
- .xword 0x46fcab0301fbbb2f ! double 9.3033026487185308E+33
- .xword 0x46f6c8e5ca239029 ! double 7.3940761635423421E+33
- .xword 0xc6fc43fd98036a41 ! double -9.172707828336624E+33
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement