introduce 8-byte LE helpers

Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
This commit is contained in:
Nikunj A Dadhania 2015-07-02 17:05:36 +05:30 committed by Alexey Kardashevskiy
parent 655fabf136
commit fd5d7089dd
2 changed files with 8 additions and 2 deletions

View File

@ -17,6 +17,9 @@ here c@ ef = CONSTANT ?littleendian
?bigendian [IF]
: x!-le >r xbflip r> x! ;
: x@-le x@ xbflip ;
: l!-le >r lbflip r> l! ;
: l@-le l@ lbflip ;
@ -47,6 +50,9 @@ here c@ ef = CONSTANT ?littleendian
[ELSE]
: x!-le x! ;
: x@-le x@ ;
: l!-le l! ;
: l@-le l@ ;

View File

@ -383,8 +383,8 @@ AA268B49521E5A8B CONSTANT GPT-PREP-PARTITION-4
debug-disk-label? IF
." GPT PReP partition found " cr
THEN
block gpt-part-entry>first-lba x@ xbflip
block gpt-part-entry>last-lba x@ xbflip
block gpt-part-entry>first-lba x@-le
block gpt-part-entry>last-lba x@-le
over - 1+ ( addr offset len )
swap ( addr len offset )
block-size * to part-offset