Date: Mon, 26 Feb 1996 18:21:15 +0500 (GMT+0500) From: "Serge A. Babkin" <babkin@hq.icb.chel.su> To: bde@zeta.org.au (Bruce Evans) Cc: hackers@freebsd.org Subject: as(1) patch & dis Message-ID: <199602261321.SAA10862@hq.icb.chel.su> In-Reply-To: <199512261054.VAA31894@godzilla.zeta.org.au> from "Bruce Evans" at Dec 26, 95 09:54:01 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Hello! I have found a bug in the assembler. It does not understand the following construction: _x: .long 1 _y: .long 2 mov %eax,(_y-_x)(%ebx) ^^^^^^^^ (differences as displacements) I needed this for my experiments with kernel startup time BIOS calls. I have fixed this bug. Commit it please if you find this patch enough good. BTW, for fixing this bug :-) I have written a 386 disassembler. It's alpha quality yet but already useful. I think any people who wants to reengineer some "object-only" BSDi code will find it useful too. So how about to commit it ? Thanks! The patch is: *** 1.1 1996/01/22 12:23:07 --- config/tc-i386.c 1996/02/26 13:09:25 *************** *** 1644,1649 **** --- 1644,1652 ---- RESTORE_END_STRING (displacement_string_end); input_line_pointer = save_input_line_pointer; switch (exp_seg) { + case SEG_DIFFERENCE: + i.types[this_operand] |= Disp32; /* this is an address ==> 32bit */ + break; case SEG_ABSENT: /* missing expr becomes absolute 0 */ as_bad("missing or invalid displacement '%s' taken as 0",
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602261321.SAA10862>