handle sign extension of constants of various lengths
handle sign extension of constants of various lengths

This is a generalization of 9918ea6 which handles 8-bit and 16-bit as
well as 32-bit values.

getlantern/avian,lwahlmeier/avian,marcinolawski/avian,minor-jason/avian,ucdseniordesign/avian,lwahlmeier/avian,dicej/avian,bigfatbrowncat/avian-pack.avian,MaartenR/avian,joshuawarner32/avian,minor-jason/avian,dicej/avian,minor-jason/avian,lostdj/avian,lostdj/avian,bgould/avian,marcinolawski/avian,getlantern/avian,MaartenR/avian,minor-jason/avian,joshuawarner32/avian,ucdseniordesign/avian,bigfatbrowncat/avian-pack.avian,joshuawarner32/avian,bigfatbrowncat/avian-pack.avian,dicej/avian,ucdseniordesign/avian,bgould/avian,marcinolawski/avian,MaartenR/avian,MaartenR/avian,marcinolawski/avian,lwahlmeier/avian,dicej/avian,lostdj/avian,bgould/avian,bgould/avian,joshuawarner32/avian,getlantern/avian,bigfatbrowncat/avian-pack.avian,lwahlmeier/avian,lostdj/avian,getlantern/avian,ucdseniordesign/avian