Skip to content

Commit

Permalink
MIPS MSA: changes to get it compiling
Browse files Browse the repository at this point in the history
The code issues -Wshadow, -Wcast-align and -Wunused warnings. The actual
check on the ISA revision seems to be excessive; the code does compile
at ISA level 2 and probably the ISA check is unnecessary.  Built but
cannot be tested without an emulator or hardware.

Signed-off-by: John Bowler <[email protected]>
  • Loading branch information
jbowler committed Oct 9, 2024
1 parent 83016f4 commit ea696ef
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 0 additions & 2 deletions mips/filter_msa_intrinsics.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
#define png_ldr(type,pointer)\
(temp_pointer = png_ptr(type,pointer), *temp_pointer)

#if PNG_MIPS_MSA_OPT > 0

#ifdef CLANG_BUILD
#define MSA_SRLI_B(a, b) __msa_srli_b((v16i8) a, b)

Expand Down
2 changes: 1 addition & 1 deletion mips/mips_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ png_init_filter_functions_msa(png_structp pp, unsigned int bpp)
}
}

# define png_target_init_filter_functions_impl png_init_filter_functions_mips
# define png_target_init_filter_functions_impl png_init_filter_functions_msa
2 changes: 1 addition & 1 deletion mips/msacheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* This code has been moved from the original in pngpriv.h.
*/
/* MIPS MSA checks: */
#if defined(__mips_msa) && (__mips_isa_rev >= 5)
#if defined(__mips_msa) && (__mips_isa_rev >= 2)
/* MIPS MSA support requires gcc >= 4.7: */
# ifdef __GNUC__
# if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)
Expand Down

0 comments on commit ea696ef

Please sign in to comment.