Commit Graph

4 Commits

Author SHA1 Message Date
Michael McLoughlin
0d789c8353 operand: fix integer float data (#393)
Issue #387 pointed out that integer float data is printed incorrectly, such
that it is not parsed correctly by the Go assembler. Specifically, integer
values need the decimal point, otherwise they will be treated as integers. For
example, 1 must be represented as `$(1.)` or `$(1.0)` to be parsed correctly.

This PR fixes that problem and adds a regression test.  The root of the
problem was that the formatting verb `%#v` does not have the right behavior
for integers. We fix it by deferring to custom `String()` function for the
float operand types.

Fixes #387
Closes #388
2023-06-11 16:12:59 -07:00
Michael McLoughlin
de9c629bcb operand: remove TODO about deleting Imm()
Starting to think this function could have its place.

Updates #18
2019-01-07 22:32:58 -08:00
Michael McLoughlin
2e250a6f4c operand: doc for exported symbols (#9) 2019-01-04 21:38:23 -08:00
Michael McLoughlin
abd300c0e9 operand: const types 2018-12-26 16:42:39 -08:00