Imported the ARM-7 port as of hg changeset 129 / Aug 08 2012