►
From YouTube: OMR Architecture Meeting 20200910
Description
Agenda:
* New IL opcodes sbyteswap and lbyteswap (#5517) [ @aviansie-ben ]
* Should byte-reversed load/store opcodes be moved to OMR? (#5149) [ @aviansie-ben ]
A
B
Okay,
so
starting
off,
I'm
just
gonna
give
a
little
bit
of
background.
So
currently,
omr
already
has
a
an
op
code
for
reversing
the
order
of
bytes
in
a
32-bit
integer.
So
we
already
have
an
I-byte
swap-op
code,
and
these
kinds
of
opcodes
are
very
useful
for
converting
between
big
endian
and
little
endian
representations
of
integers.
B
So
what
I'm
proposing
here
is
that
we
add
two
new
op
codes,
s
byte
swap
and
l
byte,
swap
to
perform
the
same
operation
on
16
and
64
bit
values.
There
is
already
code
for
doing
this
in
openj9,
for
I
believe
it's
xp
and
z
that
we
can
borrow
to
implement
these
on
those
platforms.
B
So
I
don't
think,
there's
terribly
much
implementation
work
here
and
these
op
codes
are
basically
analogous
to
our
existing
ibyte
swap
op
code,
but
for
16
and
64-bit
values.
So
I
don't
think
there's
terribly
much
going
on
here.
One
thing
andrew
did
bring
up
was
the
potential
of
also
doing
a
bite
swap.
B
However,
I
haven't
been
able
to
come
up
with
a
compelling
use
case
for
doing
this.
Typically,
if
the
user
is
provided
with
access
to
the
individual
bytes
of
a
value,
it's
not
usually
a
pointer.
B
You
wouldn't
usually
send
pointers
over
the
network
or
store
them
on
disk
and
typically
in
things
like
webassembly,
even
where
little
endian
is
strictly
required,
you
don't
really.
You
don't
provide
the
user
with
direct
access
to
sort
of
manipulate
pointers.
B
B
So
the
reason
that
I
don't
I'm
not
proposing
doing
this
on
floating
point
values
is
because
I
don't
actually
know
of
any
architecture
that
lets
you
do
a
byte
reverse
directly
on
a
floating
point
value.
So
typically,
you
would
have
to
move
it
into
a
gpr.
Do
byte
swap
there
and
move
back
so
it
would
be
better
to
just
represent
it
as
an
integer
byte
swap
followed
by
a
bit
conversion.
C
Okay,
yeah
so
there's
a
mapping
to
to
a
convenient
instruction
on
at
least
one
platform
in
the
cases
that
you
are
proposing.
Okay,.
B
Yes,
so
on
on
xp
and,
I
believe,
z
for
p,
specifically
it's
with
p10.
We
have
specific
instructions
for
doing
this
efficiently
and
even
prior
to
p10
on
power.
There
are
more
efficient
series
of
instructions
you
can
use.
B
So
there
is
both
use
case
for
representing
this
in
the
il
from
the
user
perspective
and
there's
optimization
potential
in
the
code
generator.
D
Ben
just
following
up
on
the
floating
point
question:
if
you
were
going
to
use,
say
the
eye
byte
swap
or
the
l
byte
swap
to
do
the
floating
point
reversal,
I'm
a
little!
I'm
not
quite
sure
what
the
trees
would
have
to
look
like
for
that,
because
if
you
added
like
an
f
to
I
or
d
to
I
or
d
l
or
whatever,
to
convert
the
type
of
the
node,
you
would
be
implying
changes
in
how
the
bit
pattern
is
represented
in
memory
because
you're
changing
the
type.
B
C
A
Yeah
I
mean
in
terms
of
the
precedence
I
mean
we
certainly
like
you
mentioned,
already,
have
an
I
by
an
ibyte
swap,
so
I
think
that
there
shouldn't
be
any
problem
from
a
precedent
point
of
view,
with
with
extending
this
to
the
to
these
other
data
types.
C
Was
the
intent
to
also
so
so,
given
that
there's
only
one
byte
swap
op
code
present
in
the
code
base
right
now,
there
may
be
places
that
do
certain
optimizations
checking
for
I
bite
swap
specifically,
is
there
an
intent
to
also
look
at
those
places
and
see
how
if
some
of
them
can
be
converted
to
using
the
is
byte
swap
query
instead,
the
I
think
listed
in
one
of
the
properties
or
one
of
the
comments
in
the
issue
and
the
it'll
have
that
property
set
these
two
upwards
as
well.
B
C
B
C
A
Sure,
if
there's
one
in
open
so
open
gen9
would
have
been
the
motivator
for
this.
There
may
be
an
issue
in
openj9
that
talks
about
why
they
didn't
use
the
opcode
rather
than
the
recognized
methods
check
there
as
well.
E
Yeah,
I
can't
remember
this
coming
up
before,
and
at
least
as
long
as
we've
been
discussing
il
changes
really,
but
that
would
be
the
only.
I
guess
concern
if
there
was
some
if
we
had
gone
through
some
evaluation
of
and
like
the
usual
sort
of
process
for
deciding
whether
something
should
be
a
new
op
code
or
not,
and
came
to
that
conclusion
for
some
reason
that
we
somehow
haven't
been
able
to
replicate
in
this
meeting.
That
would
be
the
only
concern,
but
I
can't
think
of
one.
C
I
agree:
I
mean
from
a
consistency
and
even
completeness
standpoint
having
this
makes
it
better
yeah.
C
F
C
Yeah,
that's
useful
to
know,
I
think
it's
still
the
case
that
there's
no
good
reason
other
than
that
was
just
the
use
case
that
was
relevant
for
daa
or
whatever
the
open,
j9
issue
that
you
mentioned.
A
A
B
If
I
understand
we're
all
on
the
same
page
about
s,
byte
swap
and
l
byte
swap
does
anybody?
Has
anybody
come
up
with
a
use
case
for
a
byte
swap
or
does
anybody
have
any
reason
that
we
should
add
that
I'd
rather
not
add
it
until
we
have
a
use
case,
though
yeah
I
don't
see
any
reason
myself
right
now,
so.
E
E
D
Well,
if,
if
the,
if
the
precedent
is
that
for
f
and
d,
you
do
f
bits
to
I
and
d
bits
to
l,
then
it
would
follow
that
a
should
go
through
either
a
to
I
or
a
to
l
right,
and
there
can
be
a
comment
to
that
effect.
Put
in
the
il
file
where
we
document
these
that
we've
done
we're
doing
them
simply
based
on
the
width
right
s
I
and
l,
and
if
you
need,
if
you've
got
some
other
type,
that's
carrying
additional
semantic
information.
D
A
Are
there
trill
tests
written
for
the
ibyte
swap
and
you'll
just
extend
those.
B
For
l
and
s,
no,
there.
B
Existing
trill
tests
for
that
I
would
add
tests
for
s
I
and
l
byte,
swap
if
I
was
going
to
add
these,
though.
A
C
And
going
back
to
the
prior
point
that
andrew
was
making,
I
think
it
would
be
good
to
document
in
some
way
the
rationale
for
not
introducing
a
bite
swap
at
this
point,
because
we
started
this
meeting
with
there's
an
eye
byte
swap
in
our
opcode
list,
but
we
don't
have
these
other
ones.
Does
anybody
know
the
reasons
why
that
was
done
and
we
don't
want
to
have
that
conversation
again
so
documenting
the
discussion
now
would
be
good
when
you
add.
B
These
I
mean
right,
I
did.
I
have
put
an
ish
comment
on
the
issue
regarding
a
byte
swap,
but
I
could
document
it
somewhere
else
if
there's
somewhere
better
that
you
think
this
should
go.
D
Well,
just
for
my
personal
opinion
would
be
to
put
a
comment
somewhere
in
the
in
the
code,
possibly
where
we're
declaring
the
properties
or
something
like
that,
just
to
say
that
we're
just
using
these
ones
for
the
widths
and
that
we
don't
need
the
a
and
floating
point
equivalents
because
of
right,
just
documented
somewhere
in
the
code
where
we
codify
the
op
codes,
so
that
we
don't
have
to
go.
Looking
for
a
separate
issue.
B
But
yeah,
I
agree.
That's
somewhat
beyond
the
scope
of
this
right.
E
A
Is
there
any
support
right
now
in
in
like
simplifier
for
byte
swap?
Does
it
just
do
the
most
basic.
B
B
B
So
I
guess
that
moves
us
into
our
next
topic
of
by
reverse
loads
and
stores,
so
openj9
does
currently
have
some
byte
reverse
load
and
store
op
codes.
Things
like
iri
load,
which
is
supposed
to
load
an
integer
and
bite,
reverse
it
simultaneously.
B
This
is
this
is
technically
a
single
operation
on
power.
However,
it
has
been
brought
up
that
it's
probably
better
to
target
a
a
pattern
match
in
the
code
generator
to
do
this,
rather
than
having
special
op
codes
for
it.
C
D
D
A
B
C
C
You
mean
they
are.
We
have
the
code
gen
for
them,
but
do
you
also
know,
I
guess
daa
would
be
the
best
guess
for
where
they're
produced.
Is
that
right,
any
other
context
for
what
generates
them,
because.
B
I
I
haven't
the
only
thing
I've
seen
that
generates
them
is
daa.
F
D
C
Yeah
there's
I
I
don't
even
think,
there's
an
argument
around
the
fact
that
if
you
didn't
expose
it
as
one
indivisible
thing,
which
is
what
the
I
guess,
the
ir
load
or
ir
store
up
codes
are,
if
you
break
them
up
into
two
things,
I
I
don't
think
there's
an
argument
even
that
something
would
break
if
you
separated
those
two
parts
right
like,
for
example,
you
have
the
bite
swap
underneath
it,
you
might
have
an
indirect
load,
but
if
you
put
that
indirect
load
into
a
temporary
and
then
did
a
direct
load
instead,
you
could
still
pattern
match
that
and
get
the
same
result.
C
F
Problem
at
the
point
of
creation,
the
reverse
loader
stores
are
not
common.
C
E
Yeah,
I
think
the
anomicity
was
the
area
that
I
was
trying
to
think
of
an
example
where
it
would
cause
a
problem
too,
but
I
think
I
can't
think
of
one
either
unless
somehow
you
would
use
a
purely
theoretical
notion.
You'd
use
some
type
of
atomic
load
for
the
reverse,
the
byte,
reverse
load
and
not
and
you'd
end
up
using
a
non-atomic
version
of
the
load.
E
In
the
other
case,
you
could
get
different
behavior,
but
I
don't
think
that's
terribly
likely
so
and
I
think
anything
else
you
can,
if
you
happen
to
do
different,
commenting
on
the
load
versus
the
white
reverse
case.
That
would
be
another
thing,
but
we
can
handle
that
in
the
pattern
matching
of
the
evaluator
and
based
on
the
use
case
that
philip
just
described
it
doesn't
sound
like
you
have
that
very
frequently
anyway.
F
D
C
It
might
have
other
other
side
effects
as
well
yeah,
because
I
I
think
it's
just
too
special
scenario
for
us
to
leave
these
op
chords
dangling
out
there
so
yeah.
I
think
we're
all.
On
the
same
page.
A
Oh
okay,
so
ben
so
for
51.49.
I
guess
the
answer
is
no
and
you
can
close
it
as
such
with.
A
Yeah
yeah,
so
I
guess
once
the
the
bite
swap
all
the
the
family
of
bite
swap
opcodes
are
available
in
omr,
then
we
can
create
an
issue
in
openg9
to
to
deprecate
the
the
reverse,
loads
and
stores.
A
D
E
B
D
B
E
D
A
Those
okay
and
then
I'll
also
close
958
as
well,
which
was
also
a
proposal
to
add
the
l,
byte
swap
op
code
in
omr.
A
We
have
that
covered
so,
okay,
any
other
discussion
you
want
to
have
on
swapping
bytes.
A
No
okay,
those
are
the
only
topics
that
we
had
on
the
agenda
for
today.
So
if
there's
nothing
else,
I
think
we
can
adjourn
now.