Hi,
do you use debugger probe while you run the code you shared above? If yes, which debug probe you use?
I found two important points.
1) Implicitly, it is not possible to write to debug registers while debugger is attached.
2) The function Generate_Stack_error generates Machine check error by default, because you allocate more memory space than stack size is. The result of this allocation is Machine check exception before the first for loop is executed. Instruction stwux write to address 0x13fffff80 which is out of address range.
Please check, if you have set ME bit in MSR register, if yes, you have to see machine check exception. If not, set ME in MSR register.

Solution for the point two:
You must not allocate static array in the function and use pointer arithmetic instead of it. Check, if any machine check error does not occur while you have debug probe connected.
In the next step, add your assembler code and also DBCR0 settings. Disconnect the debug probe, and run the code. Then attach to micro via debugger and check, if you are in IVOR1 exception.
Regards,
Martin