Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ed557735
Commit
ed557735
authored
Sep 12, 2007
by
Arnaud Charlet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor reformatting.
From-SVN: r128436
parent
a0b38a0f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
9 deletions
+4
-9
gcc/ada/g-bytswa.adb
+4
-9
No files found.
gcc/ada/g-bytswa.adb
View file @
ed557735
...
...
@@ -6,7 +6,7 @@
--
--
--
B
o
d
y
--
--
--
--
Copyright
(
C
)
2006
,
AdaCore
--
--
Copyright
(
C
)
2006
-
2007
,
AdaCore
--
--
--
--
--
GNAT
is
free
software
;
you
can
redistribute
it
and
/
or
modify
it
under
--
--
terms
of
the
GNU
General
Public
License
as
published
by
the
Free
Soft
-
--
...
...
@@ -51,7 +51,7 @@ package body GNAT.Byte_Swapping is
function
As_Item
is
new
Ada
.
Unchecked_Conversion
(
Source
=>
Unsigned_16
,
Target
=>
Item
);
X
:
Unsigned_16
renames
As_U16
(
Input
);
X
:
constant
Unsigned_16
:=
As_U16
(
Input
);
begin
return
As_Item
((
Shift_Left
(
X
,
8
)
and
16
#
FF00
#)
or
...
...
@@ -70,7 +70,7 @@ package body GNAT.Byte_Swapping is
function
As_Item
is
new
Ada
.
Unchecked_Conversion
(
Source
=>
Unsigned_32
,
Target
=>
Item
);
X
:
Unsigned_32
renames
As_U32
(
Input
);
X
:
constant
Unsigned_32
:=
As_U32
(
Input
);
begin
return
As_Item
((
Shift_Right
(
X
,
24
)
and
16
#
0000
_00FF
#)
or
...
...
@@ -91,7 +91,7 @@ package body GNAT.Byte_Swapping is
function
As_Item
is
new
Ada
.
Unchecked_Conversion
(
Source
=>
Unsigned_64
,
Target
=>
Item
);
X
:
Unsigned_64
renames
As_U64
(
Input
);
X
:
constant
Unsigned_64
:=
As_U64
(
Input
);
Low
,
High
:
aliased
Unsigned_32
;
...
...
@@ -109,10 +109,8 @@ package body GNAT.Byte_Swapping is
-----------
procedure
Swap2
(
Location
:
System
.
Address
)
is
X
:
Unsigned_16
;
for
X
'Address use Location;
begin
X := (Shift_Left (X, 8) and 16#FF00#) or
(Shift_Right (X, 8) and 16#00FF#);
...
...
@@ -123,10 +121,8 @@ package body GNAT.Byte_Swapping is
-----------
procedure Swap4 (Location : System.Address) is
X : Unsigned_32;
for X'
Address
use
Location
;
begin
X
:=
(
Shift_Right
(
X
,
24
)
and
16
#
0000
_00FF
#)
or
(
Shift_Right
(
X
,
8
)
and
16
#
0000
_FF00
#)
or
...
...
@@ -139,7 +135,6 @@ package body GNAT.Byte_Swapping is
-----------
procedure
Swap8
(
Location
:
System
.
Address
)
is
X
:
Unsigned_64
;
for
X
'Address use Location;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment