From: drambo <drambo@broadcom.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] fatls shows duplicated entries with long and short names
Date: Fri, 22 Nov 2013 15:30:36 -0800 (PST) [thread overview]
Message-ID: <1385163036188-168237.post@n7.nabble.com> (raw)
In-Reply-To: <20131122211330.CA0F2380ADF@gemini.denx.de>
I reverted my local change and the directory listing shows no duplicates
anymore which is surprising. An inspection of the generated assembly shows
more or less the same code with the exception of the early branch taken if
'dols' is 0. The 16/8 comparison is still awkward, but at this point I'm not
confident that is the real problem here. The changing result with the same
original code seems to point to perhaps a different root cause.
Here's the original assembly:
if (vfat_enabled) {
__u8 csum = mkcksum(dentptr->name,
dentptr->ext)
;
ae012560: e1a00004 mov r0, r4
ae012564: e2841008 add r1, r4, #8
ae012568: ebfffc81 bl ae011774 <mkcksum>
if (dols && csum == prevcksum) {
ae01256c: e59dc010 ldr ip, [sp, #16]
ae012570: e35c0000 cmp ip, #0
ae012574: 0a000005 beq ae012590 <do_fat_read_at+0x718>
ae012578: e59dc024 ldr ip, [sp, #36] ; 0x24
ae01257c: e150000c cmp r0, ip
prevcksum = 0xffff;
ae012580: 030fcfff movweq ip, #65535 ; 0xffff
dentptr++;
ae012584: 02844020 addeq r4, r4, #32
return NULL;
}
if (vfat_enabled) {
__u8 csum = mkcksum(dentptr->name,
dentptr->ext)
;
if (dols && csum == prevcksum) {
prevcksum = 0xffff;
ae012588: 058dc024 streq ip, [sp, #36] ; 0x24
ae01258c: 0a000035 beq ae012668 <do_fat_read_at+0x7f0>
dentptr++;
continue;
}
}
Here's the version without the local crc variable:
if (vfat_enabled) {
if (dols && mkcksum(dentptr->name,
dentptr->ext)
== prevcksum) {
ae012560: e59dc010 ldr ip, [sp, #16]
ae012564: e35c0000 cmp ip, #0
ae012568: 0a000008 beq ae012590 <do_fat_read_at+0x718>
ae01256c: e1a00004 mov r0, r4
ae012570: e2841008 add r1, r4, #8
ae012574: ebfffc7e bl ae011774 <mkcksum>
ae012578: e59dc024 ldr ip, [sp, #36] ; 0x24
ae01257c: e150000c cmp r0, ip
prevcksum = 0xffff;
ae012580: 030fcfff movweq ip, #65535 ; 0xffff
dentptr++;
ae012584: 02844020 addeq r4, r4, #32
debug("Dentname == NULL - %d\n", i);
return NULL;
}
if (vfat_enabled) {
if (dols && mkcksum(dentptr->name,
dentptr->ext)
== prevcksum) {
prevcksum = 0xffff;
ae012588: 058dc024 streq ip, [sp, #36] ; 0x24
ae01258c: 0a000035 beq ae012668 <do_fat_read_at+0x7f0>
dentptr++;
continue;
}
}
--
View this message in context: http://u-boot.10912.n7.nabble.com/fatls-shows-duplicated-entries-with-long-and-short-names-tp165377p168237.html
Sent from the U-Boot mailing list archive at Nabble.com.
prev parent reply other threads:[~2013-11-22 23:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 16:00 [U-Boot] fatls shows duplicated entries with long and short names Hector Palacios
2013-10-14 16:04 ` Marek Vasut
2013-10-14 16:07 ` Tom Rini
2013-10-14 16:57 ` Jagan Teki
2013-10-15 7:16 ` Hector Palacios
2013-10-15 7:21 ` Jagan Teki
2013-10-15 7:26 ` Albert ARIBAUD
2013-11-22 19:31 ` drambo
2013-11-22 20:50 ` Tom Rini
2013-11-22 21:13 ` Wolfgang Denk
2013-11-22 23:30 ` drambo [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385163036188-168237.post@n7.nabble.com \
--to=drambo@broadcom.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox