Error asm operand has impossible constraints

Ругается на асм-вставку Ругается и не собирается: main.c:44: ошибка: can’t find a register in class ‘CREG’ while reloading ‘asm’ main.c:44: ошибка: ‘asm’ operand has impossible constraints Как лечить? Хочу заполнить массив нужным интом. Для теста взял статичный, потом будет по указателю на char *. Похоже, что здесь не нужны ограничения (наверное, первый раз читаю […]

Содержание

  1. Ругается на асм-вставку
  2. Arduino IDE compile error with new ESP8266 core 3.0.0 #44
  3. Comments
  4. libavcodec cannot be built if configured with «—disable-optimizations»
  5. Описание
  6. Вложения (3)
  7. История изменений (13)
  8. by Andrew , 11 лет ago
  9. by Andrew , 11 лет ago
  10. by Andrew , 11 лет ago
  11. comment:1 by Andrew , 11 лет ago
  12. comment:2 by Carl Eugen Hoyos , 11 лет ago
  13. comment:3 by llogan , 11 лет ago
  14. comment:4 by Michael Niedermayer , 11 лет ago
  15. comment:5 by Carl Eugen Hoyos , 11 лет ago
  16. comment:6 by Roger Pack , 10 лет ago
  17. comment:7 by Carl Eugen Hoyos , 10 лет ago
  18. следующий: 9 comment:8 by Roger Pack , 10 лет ago
  19. in reply to: 8 comment:9 by Carl Eugen Hoyos , 10 лет ago
  20. comment:10 by Roger Pack , 9 лет ago
  21. Compilation error with 4.14 kernel: «impossible constraint in asm» #50
  22. Comments

Ругается на асм-вставку

Ругается и не собирается:

main.c:44: ошибка: can’t find a register in class ‘CREG’ while reloading ‘asm’ main.c:44: ошибка: ‘asm’ operand has impossible constraints

Как лечить? Хочу заполнить массив нужным интом. Для теста взял статичный, потом будет по указателю на char *.

Похоже, что здесь не нужны ограничения (наверное, первый раз читаю о них, поэтому не уверен). Тут предположили несовместимые изменения, а во втором комментарии указания на повтор выходных регистров. Комментарий похож на правду, так как если вписать, например, «%ebx» , то компилируется. Но подходящей цитаты из документации с целью подтверждения найти не удалось.

Закомментил регистры. Работает, копирует, не падает. Спасибо.

Но подходящей цитаты из документации с целью подтверждения найти не удалось.

You may not write a clobber description in a way that overlaps with an input or output operand. … There is no way for you to specify that an input operand is modified without also specifying it as an output operand.

Так что если нужно указать, что будут изменены значения регистров используемых под входные операнды — надо их дублировать в списке выходных операндов, а не в списке изменённых

Источник

Arduino IDE compile error with new ESP8266 core 3.0.0 #44

/arduino/libraries/Brzo_I2C/brzo_i2c.c: In function ‘brzo_i2c_write’:
/arduino/libraries/Brzo_I2C/brzo_i2c.c:72:2: error: cannot find a register in class ‘RL_REGS’ while reloading ‘asm’
72 | asm volatile (
| ^

/arduino/libraries/Brzo_I2C/brzo_i2c.c:72:2: error: ‘asm’ operand has impossible constraints
exit status 1
Fehler beim Kompilieren für das Board Generic ESP8266 Module.

Can this be easy fixed? Thanks.
I’m using latest brzo version.

The text was updated successfully, but these errors were encountered:

I can confirm the same for anything using brzo_i2c with v3.0.0. I have used all previous versions of the ESP8266 core (2.7.4 through 2.3.0) and they all work fine with v1.3.3 of the Brzo library. The new v3.0.0 core generates the same error as shown above.

Probably related to #40.

Well, I am not an expert on GCC. I don’t know what they exactly changed in the tool chain, like compiler switches or so. I am using many registers, so the compiler basically says «no more registers». But why suddenly they run out of registers, I really don’t know.

Maybe better to ask at arduino core

I am not an real assembler guy but I can read with datasheet next to code.
Here’s a patch that could be tested. You need to know that I did not test it, so I don’t know if it still works and neither the impact on performances.
I reduced the requested register size (where I could understand that it is safe but @pasko-zh may advise) and with these changes gcc-10.2-xtensa is fine.

edit: Maybe this is a non-sense because one cannot use a non-32bit variable to be mapped to a register. gcc not complaining made me confident.

Источник

libavcodec cannot be built if configured with «—disable-optimizations»

Сообщил: Andrew Владелец:
Приоритет: minor Компонент: avcodec
Версия: git-master Ключевые слова:
Копия: Blocked By:
Blocking: Reproduced by developer: да
Analyzed by developer: нет

Описание

In file included from libavcodec/cabac.h:60,

libavcodec/x86/cabac.h: In function ‘get_cabac_bypass_sign_x86’:
libavcodec/x86/cabac.h:107: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
libavcodec/x86/cabac.h:107: error: ‘asm’ operand has impossible constraints
make: * [libavcodec/cabac.o] Error 1

Вложения (3)

Download all attachments as: .zip

История изменений (13)

by Andrew , 11 лет ago

by Andrew , 11 лет ago

by Andrew , 11 лет ago

comment:1 by Andrew , 11 лет ago

sorry,
1) ./version.sh
N-35739-ga6c4c0f
2) This error has appeared not later the beginning of December.

Reproduced by developer: задано
Состояние: new → open

Only reproducible for ia32, regression since 599b4c6e.

Краткое описание: libacvodec cannot be built if it configured with «—disable-optimizations» → libavcodec cannot be built if configured with «—disable-optimizations»

reverting 599b4c6e just causes the next file to fail:
libpostproc/postprocess_template.c: In function ‘dering_MMX2’:
libpostproc/postprocess_template.c:1045:5: error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’
libpostproc/postprocess_template.c:1045:5: error: ‘asm’ operand has impossible constraints

Решение: → fixed
Состояние: open → closed

Not reproducible anymore.

Решение: fixed
Состояние: closed → reopened

I was just able to reproduce it with

./configure —enable-memalign-hack —arch=x86 —enable-gpl —enable-libx264 —enable-avisynth —enable-libxvid —target-os=mingw32 —cross-prefix=/home/rogerdpack/dev/ffmpeg-windows-build-helpers/builds/mingw-w64-i686/bin/i686-w64-mingw32- —pkg-config=pkg-config —enable-libmp3lame —enable-version3 —enable-libvo-aacenc —enable-libvpx —extra-libs=-lws2_32 —extra-libs=-lpthread —enable-zlib —extra-libs=-lwinmm —extra-libs=-lgdi32 —enable-librtmp —enable-libvorbis —enable-libtheora —enable-libspeex —enable-libopenjpeg —enable-gnutls —enable-libgsm —enable-libfreetype —disable-optimizations —enable-runtime-cpudetect

I think the work around is to also use —disable-mmx if you use —disable-optimizations. Is this expected?

Feel free to re-close it if I’m wrong though, and I will research a bit more into it 🙂

Решение: → fixed
Состояние: reopened → closed

Please do not reopen ancient tickets, I suspect you have found ticket #1695, patches exist.

Ok I hope #1695 fixes it (and may be related, though I’ll admit that the error message I got was that described in this ticket). Real work around for now: configure with —disable-postproc.

Ok I hope #1695 fixes it (and may be related, though I’ll admit that the error message I got was that described in this ticket). Real work around for now: configure with —disable-postproc.

—disable-postproc helped with an error compiling cabac.c, are you sure?

(—disable-postproc helped it avoid the other error he mentioned «error: can’t find a register in class ‘GENERAL_REGS’ while reloading ‘asm’») FWIW. I haven’t run into this for quite awhile and so appreciate the fix.

Источник

Compilation error with 4.14 kernel: «impossible constraint in asm» #50

Trying to compile the latest isgx module from the master branch:

I see this error on both Fedora 27 and Arch Linux.

The text was updated successfully, but these errors were encountered:

This seems to be a recurrence of #13, and even has the same workaround.

So I understand that the only difference is the addition of M=$(PWD) instead of SUBDIRS=$(PWD) in the original Makefile.
Can we close it?

I have been working around this problem by removing the -O0 option from CFLAGS_MODULE in the Makefile . I would consider closing it without an attempt at understanding it to be premature.

I ran into similiar problems when compiling kernel 4.14 by changing -O2 to -O0.

`In file included from ./include/linux/compiler_types.h:58:0,
from ./include/linux/compiler.h:5,
from ./arch/x86/include/asm/atomic.h:5,
from ./include/linux/atomic.h:5,
from ./include/linux/crypto.h:20,
from arch/x86/kernel/asm-offsets.c:9:
./arch/x86/include/asm/cpufeature.h: In function ‘_static_cpu_has’:
./include/linux/compiler-gcc.h:270:38: warning: asm operand 0 probably doesn’t match constraints
#define asm_volatile_goto(x. ) do < asm goto(x); asm («»); >while (0)
^
./arch/x86/include/asm/cpufeature.h:148:3: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(«1: jmp 6fn»
^
./include/linux/compiler-gcc.h:270:38: warning: asm operand 2 probably doesn’t match constraints
#define asm_volatile_goto(x. ) do < asm goto(x); asm («»); >while (0)
^
./arch/x86/include/asm/cpufeature.h:148:3: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(«1: jmp 6fn»

./include/linux/compiler-gcc.h:270:38: error: impossible constraint in ‘asm’
#define asm_volatile_goto(x. ) do < asm goto(x); asm («»); >while (0)
^
./arch/x86/include/asm/cpufeature.h:148:3: note: in expansion of macro ‘asm_volatile_goto’
asm_volatile_goto(«1: jmp 6fn»
^`

The trouble above was caused by extended assembly in arch/x86/include/asm/cpufeature.h, where the modifiers of the operand 0 and 2 were i, meaning that immediate integers were expected. But they both used parameter bit, which was a variable instead of a constant. If -O2 was specified, the inline function _static_cpu_has was expanded with a constant in place of parameter bit, which bypassed the restriction.

static __always_inline __pure bool _static_cpu_has(u16 bit) < asm_volatile_goto(«1: jmp 6fn» «2:n» «.skip -(((5f-4f) — (2b-1b)) >0) * » «((5f-4f) — (2b-1b)),0x90n» «3:n» «.section .altinstructions,»a»n» » .long 1b — .n» /* src offset */ » .long 4f — .n» /* repl offset */ » .word %P1n» /* always replace */ » .byte 3b — 1bn» /* src len */ » .byte 5f — 4fn» /* repl len */ » .byte 3b — 2bn» /* pad len */ «.previousn» «.section .altinstr_replacement,»ax»n» «4: jmp %l[t_no]n» «5:n» «.previousn» «.section .altinstructions,»a»n» » .long 1b — .n» /* src offset */ » .long 0n» /* no replacement */ » .word %P0n» /* feature bit */ » .byte 3b — 1bn» /* src len */ » .byte 0n» /* repl len */ » .byte 0n» /* pad len */ «.previousn» «.section .altinstr_aux,»ax»n» «6:n» » testb %[bitnum],%[cap_byte]n» » jnz %l[t_yes]n» » jmp %l[t_no]n» «.previousn» : : **»i» (bit)**, «i» (X86_FEATURE_ALWAYS), **[bitnum] «i» (1 > 3]) : : t_yes, t_no); t_yes: return true; t_no: return false; >

Источник

On x86-64, I got

[hjl@gnu-6 asm-2]$ cat x.i
void foo (int disks, int start, int stop, unsigned long bytes, void **ptrs)
{
  unsigned char **dptr = (unsigned char **)ptrs;
  unsigned char *p, *q;
  int d, z, z0;
  z0 = stop;
  p = dptr[disks-2];
  q = dptr[disks-1];
  for ( d = 0 ; d < bytes ; d += 512 ) {
    asm volatile("#"
		 :
		 : "m" (p[d]), "m" (p[d+64]), "m" (p[d+128]), "m" (p[d+192]),
		 "m" (p[d+256]), "m" (p[d+320]), "m" (p[d+384]),
		 "m" (p[d+448]), "m" (q[d]), "m" (q[d+64]),
		 "m" (q[d+128]), "m" (q[d+192]), "m" (q[d+256]),
		 "m" (q[d+320]), "m" (q[d+384]), "m" (q[d+448]));
    for ( z = z0-1 ; z >= start ; z-- ) {
      asm volatile("#"
		   :
		   :
		   "m" (dptr[0][d]));
    }
    asm volatile("#"
		 :
		 : "m" (p[d]), "m" (p[d+64]), "m" (p[d+128]), "m" (p[d+192]),
		 "m" (p[d+256]), "m" (p[d+320]), "m" (p[d+384]),
		 "m" (p[d+448]), "m" (q[d]), "m" (q[d+64]),
		 "m" (q[d+128]), "m" (q[d+192]), "m" (q[d+256]),
		 "m" (q[d+320]), "m" (q[d+384]), "m" (q[d+448]));
  }
}
[hjl@gnu-6 asm-2]$ make
/export/build/gnu/gcc/build-x86_64-linux/gcc/xgcc -B/export/build/gnu/gcc/build-x86_64-linux/gcc/ -O2 -fno-asynchronous-unwind-tables -S -o x.s x.i
x.i: In function ‘foo’:
x.i:10:5: error: ‘asm’ operand has impossible constraints
     asm volatile("#"
     ^~~
x.i:23:5: error: ‘asm’ operand has impossible constraints
     asm volatile("#"
     ^~~
Makefile:23: recipe for target 'x.s' failed
make: *** [x.s] Error 1
[hjl@gnu-6 asm-2]$


Comment 1


Andrew Pinski



2016-08-13 00:46:18 UTC

I don't see why you think this is a bug.

Though I can see that the m should be able to handle reg+imm and then there are only really two registers used.


Comment 2


Bernd Edlinger



2016-08-13 09:05:24 UTC

identical error on arm-unknown-eabi
but works on aarch64-unknown-elf.

maybe the asm needs too many address registers?

Recommend Projects

  • React photo

    React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo

    Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo

    Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo

    TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo

    Django

    The Web framework for perfectionists with deadlines.

  • Laravel photo

    Laravel

    A PHP framework for web artisans

  • D3 photo

    D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Visualization

    Some thing interesting about visualization, use data art

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo

    Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo

    Microsoft

    Open source projects and samples from Microsoft.

  • Google photo

    Google

    Google ❤️ Open Source for everyone.

  • Alibaba photo

    Alibaba

    Alibaba Open Source for everyone

  • D3 photo

    D3

    Data-Driven Documents codes.

  • Tencent photo

    Tencent

    China tencent open source team.

View previous topic :: View next topic  
Author Message
121488
n00b
n00b

Joined: 21 Oct 2005
Posts: 9

PostPosted: Tue Jun 19, 2018 7:59 pm    Post subject: Error when emerging ffmpeg Reply with quote

Hi,

I get the following errors when trying to emerge ffmpeg. Any ideas what I can do to resolve this?

Code:
src/libpostproc/postprocess_template.c: In function ‘dering_SSE2’:

src/libpostproc/postprocess_template.c:1097:5: error: ‘asm’ operand has impossible constraints

     __asm__ volatile(

     ^

src/libswscale/x86/rgb2rgb_template.c: In function ‘rgb24toyv12_mmx’:

src/libswscale/x86/rgb2rgb_template.c:1727:9: error: ‘asm’ operand has impossible constraints

         __asm__ volatile(

         ^

The emerge output…

https://www.dropbox.com/s/y43hma3zxbvj5id/ffmpeg.log?dl=0

Back to top

View user's profile Send private message

krinn
Watchman
Watchman

Joined: 02 May 2003
Posts: 7467

PostPosted: Tue Jun 19, 2018 11:01 pm    Post subject: Reply with quote

the ‘asm’ operand has impossible constraints is because gcc is starving registers, once gcc have no way to backup and find one free register for the needed operation, it will emit the «impossible constraints», as a «hey i need put that ball in that hole, to do so i need to move away the one that is in to another hole first, but there’s just no hole to move it to! impossible»

this should of course appears on 32bits build.

your solve is:

* do not build 32bits version

* drop -fomit-frame-pointer because it take an extra register, and it’s too much here

* reduce pressure on registers (another way to do that is by dropping need of registers, avx, sse2… take the one you wish lost, you might also build a less optimize 32bits and keep high optimization for the 64bits version)

* disable lto

* report and wait for a fix

Pick the one you think is the more acceptable for you.

Back to top

View user's profile Send private message

Josef.95
Advocate
Advocate

Joined: 03 Sep 2007
Posts: 4302
Location: Germany

PostPosted: Tue Jun 19, 2018 11:15 pm    Post subject: Reply with quote

Disable the LTO Stuff should probably help.
Back to top

View user's profile Send private message

fedeliallalinea
Administrator
Administrator

Joined: 08 Mar 2003
Posts: 29427
Location: here

PostPosted: Wed Jun 20, 2018 5:29 am    Post subject: Reply with quote

https://bugs.gentoo.org/645778
_________________
Questions are guaranteed in life; Answers aren’t.
Back to top

View user's profile Send private message

121488
n00b
n00b

Joined: 21 Oct 2005
Posts: 9

PostPosted: Thu Jun 21, 2018 7:46 pm    Post subject: Reply with quote

Josef.95 wrote:
Disable the LTO Stuff should probably help.

I’ve removed LTO from my make.conf now ffmpeg emerges.

Thank you.

Back to top

View user's profile Send private message

Display posts from previous:   

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Когда я внедрил сборку на языке C, я столкнулся со следующей ошибкой при компиляции этого кода с помощью команды оболочки в Ubuntu Linux 14.04.

    IFR_temp_measure.cpp: In function ‘void BlockTempClc(char*, char*, 
     int, int, char, int, int, int, int*, int, int*, int)’:
     IFR_temp_measure.cpp:1843:6: error: ‘asm’ operand has impossible 
    constraints);
    ^
    &make: *** [IFR_temp_measure.o] Error 1

Или позиция строки кода ошибки 1842,1843 отвечает на код

    :"cc", "memory","q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q10", "q11", "q12", "q13", "q14", "q15","r0", "r1", "r3", "r4", "r5","r6","r8", "r9", "r10", "r12"
            );

Я пытался решить эту проблему, но в Интернете доступно несколько ссылок, есть компоновщик:
Встроенная сборка Gcc, что означает «операнд asm имеет невозможные ограничения»? и http://www.ethernut.de/en/documents/arm-inline-asm.html
но не помогло.
Мой код выглядит следующим образом:

    void BlockTempClc(char* src1,char* src2,int StrideDist,int height,char temp_comp1,int numofiterations,int temp_comp2,int temp_comp3,int *dstData,int width,int *dstSum,int step)
{

            volatile char array1[16] = {0,0,0,0,0,0,0,0,
                                       0,0,0,0,0,0,0,0};
            volatile char array2[16] = {0,0,1,0,2,0,3,0,
                                       4,0,5,0,6,0,7,0};
            asm volatile(   
            "mov        r0, %0; " //image[0]    
            "mov        r1, %1; "  //image[1] 
            "mov        r12,%11; " //m
            "mov        r3, %4; " //n
            "mov        r4, %2; " //store data
            "mov        r8, %12; " //step down for loading next line of image
            "mov        r5, %6; " //numofiterations
            "mov        r6, %3; " //out

            "mov.8 r9,%5;"//isp_temp_comp
            "mov.8 r10,%7;"//led_temp_comp
            "mov.8 r11,%8;"//fac_temp_comp


            "vdup.8 d20,r9;"//copy arm register value isp_temp_comp to neon  register
            "VMOV.S16 q9, d20; " //isp_temp_comp transfer to signed short type

            "VLD1.8     {d16,d17}, [%9];"//q8  array1 sum
            "VLD1.8     {d6,d7}, [%10];"//q3  array2

            "VMOV.S16   q0, #256; "
            "VMOV.S16   q1, #2730; " //Assign immediate number 2730 to each 16 bits of d1       

            ".loop:;"           

            "vdup.8 d21,r10;"//copy arm register value led_temp_comp to neon  register 
            "vdup.8 d22,r11;"//copy arm register value fac_temp_comp to neon  register 

            "VLD1.8    d14, [r1],r8; "    // q7  *(image[1] + tmp + n)  Load: Load Picture Pixels   r6:move step  ?
            "VLD1.8    d15, [r0],r8 "    // *(image[0] + tmp + n)  Load: Load Picture Pixels            

            "PLD        [r1]; " //Preload: one line in cache
            "PLD        [r0]; "  //?

            "VMOV.S16  q5, d14; " //q5    8*16  transfer to signed short type:*(image[1] + tmp + n) 
            "VMOV.S16  q6, d15; " //q6    8*16  transfer to signed short type : *(image[0] + tmp + n) 

            "VADD.S16  q12,q6, q9;"//*(image[0] + tmp + n) + isp_temp_comp              
            "VMOV.S16  q6, d21; " //led_temp_comp
            "VADD.S16  q13,q12, q6;"//*(image[0] + tmp + n) + isp_temp_comp+ + led_temp_comp
            "VMOV.S16  q6, d22; " //fac_temp_comp
            "VADD.S16  q14,q13, q6;"//*(image[0] + tmp + n) + isp_temp_comp+ + led_temp_comp+ fac_temp_comp
            "VSUB.S16  q15,q14, q1;"//*(image[0] + tmp + n) + isp_temp_comp+ + led_temp_comp+ fac_temp_comp-2730
            "VMLA.S16   q15, q5, q0;"//img_temp[m][n]=*(image[0] + tmp + n) + isp_temp_comp+ + led_temp_comp+ fac_temp_comp-2730+*(image[1] + tmp + n) *256 


            "VADD.S16  q2,q15, q8;"//sum                
            "VMOV.S16    q8, q2; " //q8


            "vdup.8 d20,r3;"//n 
            "vdup.8 d21,r12;"//m

            "VMOV.S16  q11, d20; " //n
            "VMOV.S16  q10, d21; " //m

            "VADD.S16  q4,q3, q11;"//(n,n+1,n+2,n+3,n+4,n+5,n+6,n+7)
            "VADD.S16  q7,q3, q10;"//(m,m+1,m+2,m+3,m+4,m+5,m+6,m+7)  q7


            "VST1.16     {d30[0]}, [r4]!; "//restore img_temp[m][n] to pointer data
            "VST1.16     {d14[0]}, [r4]!; "//restore m
            "VST1.16     {d8[0]}, [r4]!; "  //restore n

            "VST1.16     {d30[1]}, [r4]!; "     
            "VST1.16     {d14[1]}, [r4]!; "
            "VST1.16     {d8[1]}, [r4]!; "

            "VST1.16     {d30[2]}, [r4]!; "     
            "VST1.16     {d14[2]}, [r4]!; "
            "VST1.16     {d8[2]}, [r4]!; "

            "VST1.16     {d30[3]}, [r4]!; "     
            "VST1.16     {d14[3]}, [r4]!; "
            "VST1.16     {d8[3]}, [r4]!; "//response to array

            "subs        r5, r5, #1; "   // decrement: numofinteration -= 1;
            "bne        .loop; "        // Branch If Not Zero; to .loop
            "VST1.16     {d4[0]}, [r6]!; "//q2 refer to sum restore the final result to pointer out
            "VST1.16     {d4[1]}, [r6]!; "
            "VST1.16     {d4[2]}, [r6]!; "
            "VST1.16     {d4[3]}, [r6]!; "
            "VST1.16     {d5[0]}, [r6]!; "
            "VST1.16     {d5[1]}, [r6]!; "
            "VST1.16     {d5[2]}, [r6]!; "
            "VST1.16     {d5[3]}, [r6]!; "

            :"+r"(src1),"+r"(src2),"+r"(dstData),"+r"(dstSum),"+r"(height)
            :"r"(temp_comp1),"r"(numofiterations),"r"(temp_comp2),"r"(temp_comp3),
                "r"(array1),"r"(array2), "r"(width),"r"(step)
            :"cc", "memory","q0", "q1", "q2", "q3", "q4", "q5", "q6", "q7", "q8", "q10", "q11", "q12", "q13", "q14", "q15","r0", "r1", "r3", "r4", "r5","r6","r8", "r9", "r10", "r12"
            );
}

Я предполагаю, что проблема может заключаться в выходных списках операндов или в выходных списках операндов.
В чем причина ошибки моего кода? И как ее решить?

wolfSSL Logo

Skip to forum content

wolfSSL — Embedded SSL Library

Product Support Forums

You are not logged in. Please login or register.

Active topics Unanswered topics

Welcome to the wolfSSL Forums!

Please post questions or comments you have about wolfSSL products here. It is helpful to be as descriptive as possible when asking your questions.

References
Stable Releases — download stable product releases.
Development Branch — latest development branch on GitHub.

wolfSSL Manual — wolfSSL (formerly CyaSSL) product manual and API reference.

Pages 1

You must login or register to post a reply

1 2022-06-07 02:54:04

  • lili
  • Member
  • Offline
  • Registered: 2022-01-24
  • Posts: 7

Topic: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

Hi all,
I tried to run one example from I-CUBE-wolfSSL example.
My compiler is STM32CubeIDE. 
I have three errors:

1- ‘asm’ operand has impossible constraints    sp_cortexm.c    /STM32L475/Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core    line 15344    C/C++ Problem

2- make: *** [Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core/subdir.mk:403: Middlewares/wolfSSL/wolfSSL/wolfCrypt/Core/sp_cortexm.o] Error 1    STM32L475             C/C++ Problem

3- make: *** Waiting for unfinished jobs….    STM32L475             C/C++ Problem

how can i solve these errors?

Regards

2 Reply by dgarske 2022-06-07 05:26:20

  • dgarske
  • Moderator
  • Offline
  • Registered: 2015-10-07
  • Posts: 369

Re: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

This happens only in debug mode. In release mode this goes away. This is due to the use of R7 I believe. There is a cflag that can be used to workaround this like -frame-omit-pointer, but I cannot find my note on that right now.

Another option is to use math option 3 in debug and math option 4 (asm) in release. The asm does increase math performance multiple x.

Thanks,
David Garske, wolfSSL

3 Reply by dgarske 2022-06-07 09:54:45

  • dgarske
  • Moderator
  • Offline
  • Registered: 2015-10-07
  • Posts: 369

Re: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

It is «-fomit-frame-pointer» added to the CFLAGS that you can use in debug mode to resolve this.

Thanks,
David Garske, wolfSSL

4 Reply by lili 2022-06-08 03:13:50

  • lili
  • Member
  • Offline
  • Registered: 2022-01-24
  • Posts: 7

Re: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

Thanks for you help.

this problem is solved.  but I confront with these errors now:

./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls.o: in function `BuildTlsFinished’:    STM32L4A6             C/C++ Problem
./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls.o: in function `DeriveTlsKeys’:    STM32L4A6             C/C++ Problem
….
./Middlewares/wolfSSL/wolfSSL/wolfSSL/Core/tls13.o: in function `DeriveEarlySecret’:

Do you have any ideas?

5 Reply by lili 2022-06-08 03:24:27

  • lili
  • Member
  • Offline
  • Registered: 2022-01-24
  • Posts: 7

Re: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

These errors are related to

undefined reference to `wc_PRF_TLS’    STM32L4A6        line 0, external location:

undefined reference to `wc_PRF_TLS’    tls.c    /STM32L4A6/Middlewares/wolfSSL/wolfSSL/wolfSSL/Core         C/C++ Problem

Thanks in advance

6 Reply by dgarske 2022-06-09 13:41:51

  • dgarske
  • Moderator
  • Offline
  • Registered: 2015-10-07
  • Posts: 369

Re: Type ‘asm’ operand has impossible c in WOLFSSL example with STM32CuIDE

Hi lili,

Make sure you have the wolfcrypt/src/kdf.c file included. Make sure you have `WOLFSSL_HAVE_PRF` defined.
Are you using the latest wolfSSL v5.3.0 Cube pack?

Thanks,
David Garske, wolfSSL

Posts: 6

Pages 1

You must login or register to post a reply

Понравилась статья? Поделить с друзьями:
  • Error ash island feat loopy перевод
  • Error ascii 0 appeared in the statement
  • Error based sql injection mysql
  • Error base 2012
  • Error arrow function used ambiguously with a conditional expression