Skip to content

Possible mis-matched return types in AArch64 back-end #703

@rod-chapman

Description

@rod-chapman

In dev/aarch64_clean/src/arith_native_aarch64.h we see:

#define mld_rej_uniform_asm MLD_NAMESPACE(rej_uniform_asm)
uint64_t mld_rej_uniform_asm(int32_t *r, const uint8_t *buf, unsigned buflen,
                             const uint8_t *table);

#define mld_rej_uniform_eta2_asm MLD_NAMESPACE(rej_uniform_eta2_asm)
unsigned mld_rej_uniform_eta2_asm(int32_t *r, const uint8_t *buf,
                                  unsigned buflen, const uint8_t *table);

#define mld_rej_uniform_eta4_asm MLD_NAMESPACE(rej_uniform_eta4_asm)
unsigned mld_rej_uniform_eta4_asm(int32_t *r, const uint8_t *buf,
                                  unsigned buflen, const uint8_t *table);

Note that the return types are not the same. In the corresponding .S files for these functions, they all return a 64-bit value via register x0, suggesting that the latter 2 C function prototypes are not correct. Should they also return uint64_t rather than unsigned ?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions