Skip to content

Commit

Permalink
Experiment: When is __ARM_FEATURE_UNALIGNED visible?
Browse files Browse the repository at this point in the history
  • Loading branch information
clyring committed Sep 17, 2023
1 parent 5267a0a commit 078bd5d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 1 addition & 2 deletions bytestring.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ Tested-With: GHC==9.4.1,
GHC==8.0.2
Build-Type: Simple
Cabal-Version: >= 1.10
extra-source-files: README.md Changelog.md
extra-source-files: README.md Changelog.md include/bytestring-cpp-macros.h

source-repository head
type: git
Expand Down Expand Up @@ -154,7 +154,6 @@ library

include-dirs: include
includes: fpstring.h
bytestring-cpp-macros.h
install-includes: fpstring.h
bytestring-cpp-macros.h

Expand Down
4 changes: 4 additions & 0 deletions cbits/fpstring.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#define USE_SIMD_COUNT
#endif

#if defined(__ARM_FEATURE_UNALIGNED)
#warning "How about in C code?"
#endif

/* copy a string in reverse */
void fps_reverse(unsigned char *q, unsigned char *p, size_t n) {
p += n-1;
Expand Down
3 changes: 3 additions & 0 deletions include/bytestring-cpp-macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
#error "bytestring-cpp-macros.h does not work in C code yet"
#endif

#if defined(__ARM_FEATURE_UNALIGNED)
#warning "Is this macro ever actually visible to Haskell code?"
#endif

#if defined(i386_HOST_ARCH) || defined(x86_64_HOST_ARCH) \
|| ((defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) \
Expand Down

0 comments on commit 078bd5d

Please sign in to comment.