From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Thu, 17 Nov 2011 11:15:24 -0500 To: 9fans@9fans.net Message-ID: <7f3af1a5a40021d1809780aeb2bc93b0@brasstown.quanstro.net> In-Reply-To: References: <2dce475f96630e9cf6e633e2f74a2ffc@coraid.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] 6a bug Topicbox-Message-UUID: 41373fcc-ead7-11e9-9d60-3106f5b1d025 > This is a detail of the x86-64 architecture. > An immediate in an arithmetic instruction must > fit in a signed 32-bit int, and this one does not. > You've written an impossible instruction, and the > linker is telling you in own cryptic way. > The assemblers do not know such details, never have. > > You need to MOVQ that constant into a register > and then use the register as the argument to ADDQ. yup. that's the problem. i had forgotten this rule because i changed from one 64-bit constant to another. the tricky bit about the first constant was that it was a sign-extended 32-bit constant, and the linker knew this little nugget. so imagine my surprise when changing #define KZERO (0xfffffffff0000000ull) to #define KZERO (0xffffff0000000000ull) resulted in linker errors. it all makes sense now. (even if it is repulsive.) - erik