Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
libtcg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anton
libtcg
Commits
1b3cb7c8
Commit
1b3cb7c8
authored
1 year ago
by
Richard Henderson
Browse files
Options
Downloads
Patches
Plain Diff
target/hppa: Implement HAVG
Signed-off-by:
Richard Henderson
<
richard.henderson@linaro.org
>
parent
10c9e58d
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
target/hppa/helper.h
+1
-0
1 addition, 0 deletions
target/hppa/helper.h
target/hppa/insns.decode
+2
-0
2 additions, 0 deletions
target/hppa/insns.decode
target/hppa/op_helper.c
+14
-0
14 additions, 0 deletions
target/hppa/op_helper.c
target/hppa/translate.c
+5
-0
5 additions, 0 deletions
target/hppa/translate.c
with
22 additions
and
0 deletions
target/hppa/helper.h
+
1
−
0
View file @
1b3cb7c8
...
...
@@ -16,6 +16,7 @@ DEF_HELPER_FLAGS_1(ldc_check, TCG_CALL_NO_RWG, void, tl)
DEF_HELPER_FLAGS_2
(
hadd_ss
,
TCG_CALL_NO_RWG_SE
,
i64
,
i64
,
i64
)
DEF_HELPER_FLAGS_2
(
hadd_us
,
TCG_CALL_NO_RWG_SE
,
i64
,
i64
,
i64
)
DEF_HELPER_FLAGS_2
(
havg
,
TCG_CALL_NO_RWG_SE
,
i64
,
i64
,
i64
)
DEF_HELPER_FLAGS_2
(
hsub_ss
,
TCG_CALL_NO_RWG_SE
,
i64
,
i64
,
i64
)
DEF_HELPER_FLAGS_2
(
hsub_us
,
TCG_CALL_NO_RWG_SE
,
i64
,
i64
,
i64
)
...
...
This diff is collapsed.
Click to expand it.
target/hppa/insns.decode
+
2
−
0
View file @
1b3cb7c8
...
...
@@ -214,6 +214,8 @@ hadd 000010 ..... ..... 00000011 11 0 ..... @rrr
hadd_ss 000010 ..... ..... 00000011 01 0 ..... @rrr
hadd_us 000010 ..... ..... 00000011 00 0 ..... @rrr
havg 000010 ..... ..... 00000010 11 0 ..... @rrr
hsub 000010 ..... ..... 00000001 11 0 ..... @rrr
hsub_ss 000010 ..... ..... 00000001 01 0 ..... @rrr
hsub_us 000010 ..... ..... 00000001 00 0 ..... @rrr
...
...
This diff is collapsed.
Click to expand it.
target/hppa/op_helper.c
+
14
−
0
View file @
1b3cb7c8
...
...
@@ -410,6 +410,20 @@ uint64_t HELPER(hadd_us)(uint64_t r1, uint64_t r2)
return
ret
;
}
uint64_t
HELPER
(
havg
)(
uint64_t
r1
,
uint64_t
r2
)
{
uint64_t
ret
=
0
;
for
(
int
i
=
0
;
i
<
64
;
i
+=
16
)
{
int
f1
=
extract64
(
r1
,
i
,
16
);
int
f2
=
extract64
(
r2
,
i
,
16
);
int
fr
=
f1
+
f2
;
ret
=
deposit64
(
ret
,
i
,
16
,
(
fr
>>
1
)
|
(
fr
&
1
));
}
return
ret
;
}
uint64_t
HELPER
(
hsub_ss
)(
uint64_t
r1
,
uint64_t
r2
)
{
uint64_t
ret
=
0
;
...
...
This diff is collapsed.
Click to expand it.
target/hppa/translate.c
+
5
−
0
View file @
1b3cb7c8
...
...
@@ -2804,6 +2804,11 @@ static bool trans_hadd_us(DisasContext *ctx, arg_rrr *a)
return
do_multimedia
(
ctx
,
a
,
gen_helper_hadd_us
);
}
static
bool
trans_havg
(
DisasContext
*
ctx
,
arg_rrr
*
a
)
{
return
do_multimedia
(
ctx
,
a
,
gen_helper_havg
);
}
static
bool
trans_hsub
(
DisasContext
*
ctx
,
arg_rrr
*
a
)
{
return
do_multimedia
(
ctx
,
a
,
tcg_gen_vec_sub16_i64
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment