From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jonathan Larmour To: Chris Morrow Cc: ecos-discuss@sourceware.cygnus.com Subject: Re: [ECOS] hal_copy_data and hal_zero_bss Date: Mon, 15 Jan 2001 18:30:00 -0000 Message-id: <3A63B257.4E238048@redhat.com> References: <3A6369EB.E071860B@YottaYotta.com> X-SW-Source: 2001-01/msg00245.html Chris Morrow wrote: > > The hal_copy_data() and hal_zero_bss() in the mips architecture > currently > do byte reads and writes. Is there any reason they shouldn't use the > memset() and memcpy() functions from infra? There's no guarantee that calling memcpy and memset won't reference different versions of those functions that rely on the BSS being zeroed or there being initialized data. e.g. in a debug build. Better to write those to do word accesses, taking into account that the symbols may not be word-aligned. They should, but they may not be and we shouldn't explode if they aren't. It would probably be even better to just code them in assembler anyway, and avoid the call from vectors.S. It's easy to write a Duff's device implementation in asm too. Patches welcome :). Jifl -- Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062 Un cheval, pas du glue. Pas du cheval, beaucoup du glue. || Opinions==mine