Descriptioncmd/5g: use MOVB for fixed array nil check
Fixes issue 4396.
For fixed arrays larger than the unmapped page, agenr would general a nil check by loading the first word of the array. However there is no requirement for the first element of a byte array to be word aligned, so this check causes a trap on ARMv5 hardware (ARMv6 since relaxed that restriction, but it probably still comes at a cost).
Switching the check to MOVB ensures alignment is not an issue. This check is only invoked in a few places in the code where large fixed arrays are embedded into structs, compress/lzw is the biggest offender, and switching to MOVB has no observable performance penalty.
Thanks to Rémy and Daniel Morsing for helping me debug this on IRC last night.
Patch Set 1 #Patch Set 2 : diff -r 11094b97d92a https://go.googlecode.com/hg/ #Patch Set 3 : diff -r 11094b97d92a https://go.googlecode.com/hg/ #Patch Set 4 : diff -r 11094b97d92a https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 11094b97d92a https://code.google.com/p/go #Patch Set 6 : diff -r 11094b97d92a https://code.google.com/p/go #
Total comments: 5
Patch Set 7 : diff -r bbc0024af4a4 https://code.google.com/p/go #
Total comments: 3
Patch Set 8 : diff -r db11b6a8c8f9 https://code.google.com/p/go #
Total comments: 2
Patch Set 9 : diff -r db11b6a8c8f9 https://code.google.com/p/go #
Total comments: 2
Patch Set 10 : diff -r 3fc28eec1b38 https://code.google.com/p/go #Patch Set 11 : diff -r 3fc28eec1b38 https://code.google.com/p/go #Patch Set 12 : diff -r 025b9d070a85 https://code.google.com/p/go #
Total comments: 9
Patch Set 13 : diff -r 025b9d070a85 https://code.google.com/p/go #Patch Set 14 : diff -r 6e0e4077f488 https://go.googlecode.com/hg/ #Patch Set 15 : diff -r 6e0e4077f488 https://go.googlecode.com/hg/ #
MessagesTotal messages: 25
|