[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#422599: sdcc: hc08 assembler incorrectly allows move to non-direct destination



Package: sdcc
Version: 2.6.0-5
Severity: normal

The hc08 cpu understands several forms of the mov command, all involving
direct (and indexed) addresses.  In particular, this is allowed:

	mov #number, *address

while this is not:

	mov #number, address

(because it is not a direct address)

When using the second form, the compiler does not complain.  It should.
What's worse, when using the second form with an address larger than
255, it cannot generate correct code (because that doesn't exist).  The
programmer is not notified about this, which makes finding the bug
extremely hard.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.17-1-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/bash

Versions of packages sdcc depends on:
ii  libc6                         2.5-5      GNU C Library: Shared libraries
ii  sdcc-libraries                2.6.0-5    Small Device C Compiler (libraries

Versions of packages sdcc recommends:
ii  sdcc-doc                      2.6.0-5    Small Device C Compiler (documenta

-- no debconf information



Reply to: