From 3be0a0ef6fb80d099aefdba67b68df3b500188bc Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 12 Jan 2015 15:17:10 -0500 Subject: liblink: adjustments for c2go conversion Mostly this is using uint32 instead of int32 for unsigned values like instruction encodings or float32 bit representations, removal of ternary operations, and removal of #defines. Delete sched9.c, because it is not compiled (it is still in the history if we ever need it). Change-Id: I68579cfea679438a27a80416727a9af932b088ae Reviewed-on: https://go-review.googlesource.com/2658 Reviewed-by: Austin Clements --- src/liblink/obj8.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/liblink/obj8.c') diff --git a/src/liblink/obj8.c b/src/liblink/obj8.c index 02ef72753f..4e28709b81 100644 --- a/src/liblink/obj8.c +++ b/src/liblink/obj8.c @@ -206,11 +206,11 @@ progedit(Link *ctxt, Prog *p) case ACOMISS: case AUCOMISS: if(p->from.type == D_FCONST) { - int32 i32; + uint32 i32; float32 f32; f32 = p->from.u.dval; memmove(&i32, &f32, 4); - sprint(literal, "$f32.%08ux", (uint32)i32); + sprint(literal, "$f32.%08ux", i32); s = linklookup(ctxt, literal, 0); if(s->type == 0) { s->type = SRODATA; @@ -252,9 +252,9 @@ progedit(Link *ctxt, Prog *p) case ACOMISD: case AUCOMISD: if(p->from.type == D_FCONST) { - int64 i64; + uint64 i64; memmove(&i64, &p->from.u.dval, 8); - sprint(literal, "$f64.%016llux", (uvlong)i64); + sprint(literal, "$f64.%016llux", i64); s = linklookup(ctxt, literal, 0); if(s->type == 0) { s->type = SRODATA; -- cgit v1.3