Skip to content
Snippets Groups Projects

Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips

Open Brad Smith requested to merge brad/x264:getauxval_mips into master
2 unresolved threads

Merge request reports

Members who can merge are allowed to add commits.

Pipeline #527467 passed

Pipeline passed for 868171c3 on brad:getauxval_mips

Approval is optional
Merge blocked: 2 checks failed

Merge details

  • The source branch is 16 commits behind the target branch.
  • 1 commit will be added to master.
  • Source branch will be deleted.

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
504 504
505 505 #elif HAVE_MSA
506 506
507 #define HWCAP_MIPS_MSA (1U << 1)
508
507 509 uint32_t x264_cpu_detect( void )
508 510 {
509 return X264_CPU_MSA;
511 uint32_t flags = 0;
512
513 #if HAVE_GETAUXVAL
514 unsigned long hwcap = x264_getauxval( AT_HWCAP );
515
516 if ( hwcap & HWCAP_MIPS_MSA )
517 flags |= X264_CPU_MSA;
518 #endif
  • Not sure if this runtime detection is needed as it is anyway compiled with -mmsa in CFLAGS according to HAVE_MSA so can be used implicitly by compiler.

  • Brad Smith added 1 commit

    added 1 commit

    • 868171c3 - Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips

    Compare with previous version

  • Brad Smith changed title from Use getauxval() on Linux on mips to Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips

    changed title from Use getauxval() on Linux on mips to Use getauxval() on Linux and elf_aux_info() on OpenBSD on mips

  • 504 504
    505 505 #elif HAVE_MSA
    506 506
    507 #define HWCAP_MIPS_MSA (1U << 1)
    508
    507 509 uint32_t x264_cpu_detect( void )
    508 510 {
    511 uint32_t flags = 0;
    512
    513 #if HAVE_GETAUXVAL || HAVE_ELF_AUX_INFO
    514 unsigned long hwcap = x264_getauxval( AT_HWCAP );
    515
    516 if ( hwcap & HWCAP_MIPS_MSA )
    517 flags |= X264_CPU_MSA;
    518 #else
    509 519 return X264_CPU_MSA;
    Please register or sign in to reply
    Loading