Subject: tcpdump "optimizer"
To: None <tech-net@netbsd.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-net
Date: 07/19/2000 10:52:01
This doesn't look right....
# tcpdump -d 'tcp and ( host 132.206.78.32 or 216.46.5.8 ) and net 207.54.160.0/24'
(000) ldh [12]
(001) jeq #0x86dd jt 18 jf 2
(002) jeq #0x800 jt 3 jf 18
(003) ldb [23]
(004) jeq #0x6 jt 5 jf 18
(005) ld [26]
(006) jeq #0x84ce4e20 jt 11 jf 7
(007) jeq #0xd82e0508 jt 11 jf 8
(008) ld [30]
(009) jeq #0x84ce4e20 jt 11 jf 10
(010) jeq #0xd82e0508 jt 11 jf 18
(011) ld [26]
(012) and #0xffffff00
(013) jeq #0xcf36a000 jt 17 jf 14
(014) ld [30]
(015) and #0xffffff00
(016) jeq #0xcf36a000 jt 17 jf 18
(017) ret #96
(018) ret #0
...how come the optimizer didn't clean up the two comparisons at
instructions 001 and 002? (Looking at the branch destinations, it's
obvious the instruction at 001 can be deleted without affecting the
results.) Is it broken, or does it just not know how to do that?
This is 1.4T on /sparc. Fuller details available on request.
der Mouse
mouse@rodents.montreal.qc.ca
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B